/**
 * CTC Stock Animal Profile Styles
 */

/* Profile container */
.ctc-stock-animal-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f9f9f9;
}

/* Profile header */
.ctc-stock-profile-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.ctc-stock-animal-name {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.ctc-stock-animal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.ctc-stock-animal-id {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f1f1f1;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.ctc-stock-animal-species {
    font-size: 18px;
    font-weight: 500;
}

.ctc-stock-animal-species a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s;
}

.ctc-stock-animal-species a:hover {
    color: #005f8b;
    text-decoration: underline;
}

.ctc-stock-animal-scientific-name {
    font-style: italic;
    color: #666;
    font-size: 15px;
}

.ctc-stock-profile-header-image {
    margin-top: 15px;
}

.ctc-stock-profile-header-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* For medium screens and up */
@media (min-width: 768px) {
    .ctc-stock-animal-profile {
        padding: 30px 20px;
    }
    
    .ctc-stock-profile-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 30px;
    }
    
    .ctc-stock-profile-header-content {
        flex: 1 1 60%;
        padding-right: 40px;
    }
    
    .ctc-stock-profile-header-image {
        flex: 0 0 40%;
        max-width: 40%;
        margin-top: 0;
    }
    
    .ctc-stock-animal-name {
        font-size: 32px;
    }
    
    .ctc-stock-animal-meta {
        gap: 15px;
        margin-bottom: 20px;
    }
}

/* Profile content layout */
.ctc-stock-profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sections */
.ctc-stock-profile-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 15px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ctc-stock-profile-section:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.ctc-stock-profile-section h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

/* For medium screens and up */
@media (min-width: 768px) {
    .ctc-stock-profile-content {
        flex-direction: row;
        gap: 30px;
    }
    
    .ctc-stock-profile-main {
        flex: 1 1 65%;
    }
    
    .ctc-stock-profile-sidebar {
        flex: 0 0 30%;
        max-width: 30%;
    }
    
    .ctc-stock-profile-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .ctc-stock-profile-section h2 {
        font-size: 22px;
        padding-bottom: 15px;
    }
}

/* Description */
.ctc-stock-profile-description {
    line-height: 1.6;
    font-size: 15px;
}

@media (min-width: 768px) {
    .ctc-stock-profile-description {
        font-size: 16px;
    }
}

/* Photo gallery */
.ctc-stock-profile-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.ctc-stock-profile-photo {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s;
    aspect-ratio: 1;
}

.ctc-stock-profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    z-index: 10;
}

.ctc-stock-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .ctc-stock-profile-photos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        margin-top: 20px;
    }
}

/* Details list */
.ctc-stock-details-list {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 8px 12px;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    align-items: start;
}

.ctc-stock-details-list dt,
.ctc-stock-details-list dd {
    margin: 0;
    padding: 6px 0;
    vertical-align: top;
    align-self: start;
    min-height: 30px;
    display: flex;
    align-items: center;
}

.ctc-stock-details-list dt {
    font-weight: 600;
    color: #555;
    word-break: break-word;
    hyphens: auto;
}

.ctc-stock-details-list dd {
    font-weight: 400;
    word-break: break-word;
}

/* Special handling for parent info which needs different alignment */
.ctc-stock-details-list dd.parents-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: unset;
    padding-top: 8px;
    padding-bottom: 2px;
}

/* Parents information styling */
.parents-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

.parent-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    line-height: 1.4;
    margin-bottom: 2px;
}

.parent-label {
    font-weight: 600;
    color: #555;
    margin-right: 6px;
    min-width: 70px;
    display: inline-block;
    margin-bottom: 5px;
}

.parent-name {
    flex: 1;
}

/* Children information styling */
.children-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 6px;
    align-items: flex-start;
    width: 100%;
    text-align: left;
}

.children-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    text-align: left;
}

.children-list {
    padding-left: 8px;
    margin-top: 2px;
    width: 100%;
    text-align: left;
}

.child-item {
    margin-bottom: 6px;
    line-height: 1.4;
    text-align: left;
}

/* Link styling */
.ctc-stock-details-list a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.ctc-stock-details-list a:hover {
    color: #005f8b;
    text-decoration: underline;
}

/* For very small screens, stack the details */
@media (max-width: 375px) {
    .ctc-stock-details-list {
        grid-template-columns: 100%;
        gap: 0;
    }
    
    .ctc-stock-details-list dt,
    .ctc-stock-details-list dd {
        padding: 6px 0;
    }
    
    .ctc-stock-details-list dt {
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
        font-weight: 700;
    }
    
    .ctc-stock-details-list dt:first-child {
        border-top: none;
        padding-top: 0;
    }
    
    .ctc-stock-details-list dd {
        padding-bottom: 12px;
    }
    
    .parents-info {
        padding-top: 0;
    }
    
    .parent-item {
        margin-bottom: 4px;
    }
}

@media (min-width: 376px) and (max-width: 767px) {
    .ctc-stock-details-list {
        grid-template-columns: 38% 62%;
    }
}

@media (min-width: 768px) {
    .ctc-stock-details-list {
        font-size: 16px;
        gap: 10px;
        grid-template-columns: 40% 60%;
    }
}

/* Admin actions */
.ctc-stock-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ctc-stock-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    min-height: 44px;
    transition: background-color 0.2s;
}

.ctc-stock-button:hover {
    background: #006291;
    color: #fff;
}

/* Desktop optimizations */
@media (min-width: 992px) {
    .ctc-stock-animal-profile {
        padding: 40px 30px;
    }
    
    .ctc-stock-profile-header {
        margin-bottom: 40px;
    }
    
    .ctc-stock-profile-header-content {
        padding-right: 60px;
    }
    
    .ctc-stock-animal-name {
        font-size: 36px;
        margin-bottom: 20px;
    }
    
    .ctc-stock-animal-meta {
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .ctc-stock-profile-content {
        gap: 40px;
    }
    
    .ctc-stock-profile-main {
        flex: 1 1 70%;
    }
    
    .ctc-stock-profile-sidebar {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .ctc-stock-profile-section {
        padding: 25px;
        margin-bottom: 30px;
        border-radius: 10px;
    }
    
    .ctc-stock-profile-section h2 {
        font-size: 24px;
        padding-bottom: 18px;
    }
    
    .ctc-stock-profile-description {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .ctc-stock-profile-photos {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
        margin-top: 25px;
    }
    
    .ctc-stock-details-list {
        font-size: 16px;
        gap: 12px;
    }
    
    .ctc-stock-details-list dt,
    .ctc-stock-details-list dd {
        padding: 8px 0;
    }
} 