/* ==========================================================
   DOG REGISTRY - SHARED DETAILS UI
   Dogs / Kennels / Members / Litters
   ========================================================== */

.registry-details-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Details header intentionally reuses the same visual language as
   RegistryFormHeading. Only Details-specific composition lives here. */
.registry-details-header {
    margin-bottom: 24px;
}

.registry-details-heading-group {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.registry-details-heading-main {
    min-width: 0;
}

.registry-details-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

.registry-details-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    color: #87796f;
    font-size: 11px;
    font-weight: 600;
}

.registry-details-subtitle i {
    color: #b18f49;
}

/* Keep the Details decoration pixel-identical to RegistryFormHeading. */
.registry-details-decoration {
    margin-top: 10px;
}

.registry-details-actions {
    flex: none;
}

/* ==========================================================
   DETAILS NAVIGATION / TABS
   ========================================================== */

.registry-details-tabs {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    padding: 0 10px;
    background: var(--registry-surface);
    border: 1px solid #e1d7c8;
    border-radius: 10px 10px 0 0;
    scrollbar-width: thin;
}

.registry-details-tabs .details-tab {
    position: relative;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0 19px;
    color: #74665d;
    background: transparent;
    border: 0;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.registry-details-tabs .details-tab + .details-tab {
    border-left: 1px solid #eee7dc;
}

.registry-details-tabs .details-tab i {
    color: #b18f49;
    font-size: 12px;
}

.registry-details-tabs .details-tab:hover {
    color: var(--club-burgundy);
    background: #fbf6ed;
}

.registry-details-tabs .details-tab.active {
    color: var(--club-burgundy);
    background: linear-gradient(180deg, #fffdf9, #faf3e8);
}

.registry-details-tabs .details-tab.active::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    background: var(--club-burgundy);
    border-radius: 3px 3px 0 0;
}

.registry-details-tabs .details-tab.active i {
    color: var(--club-burgundy);
}

.registry-details-tabs .tab-count {
    min-width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    color: #7c642e;
    background: #efe2c6;
    border-radius: 999px;
    font-size: 8px;
}

.registry-details-tabs .details-tab.active .tab-count {
    color: #fff;
    background: var(--club-burgundy);
}

.registry-details-tab-host {
    min-height: 340px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #e1d7c8;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 20px rgba(61, 40, 30, 0.045);
}

/* ==========================================================
   LOADING / ERROR
   ========================================================== */

.registry-details-state {
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    background: var(--registry-surface);
    border: 1px solid #e3d9cc;
    border-radius: 10px;
    box-shadow: var(--registry-shadow-card);
}

.registry-details-loading,
.registry-details-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.registry-details-loading {
    gap: 13px;
    color: #776b63;
    font-size: 12px;
}

.registry-details-spinner {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--club-burgundy);
    border-width: .2em;
}

.registry-details-error-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--club-burgundy);
    background: #f7eaea;
    border-radius: 50%;
    font-size: 18px;
}

.registry-details-error h3,
.registry-details-error h4 {
    margin: 0;
    color: #49352c;
    font-family: var(--registry-font-heading);
    font-size: 19px;
    font-weight: 700;
}

.registry-details-error p {
    max-width: 600px;
    margin: 8px 0 18px;
    color: #887b72;
    font-size: 11px;
}

/* ==========================================================
   THREE-PAW SYMBOL
   ========================================================== */

.paw-group {
    position: relative;
    width: 24px;
    height: 18px;
    display: inline-flex;
    flex: 0 0 24px;
}

.paw-group i {
    position: absolute;
    color: currentColor;
    font-size: 7px !important;
}

.paw-group .paw-1 {
    left: 0;
    bottom: 1px;
    transform: rotate(-20deg);
}

.paw-group .paw-2 {
    left: 8px;
    top: 0;
    transform: rotate(4deg);
}

.paw-group .paw-3 {
    right: 0;
    bottom: 1px;
    transform: rotate(20deg);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 768px) {
    .registry-details-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .registry-details-title {
        font-size: 30px;
    }

    .registry-details-actions {
        width: 100%;
    }

    .registry-details-actions .btn {
        flex: 1;
    }

    .registry-details-tab-host {
        padding: 18px;
    }
}

@media (max-width: 576px) {
    .registry-details-title {
        font-size: 27px;
    }

    .registry-details-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .registry-details-actions .btn:last-child:nth-child(3) {
        grid-column: 1 / -1;
    }

    .registry-details-tabs {
        padding: 0;
    }

    .registry-details-tabs .details-tab {
        min-width: 52px;
        flex: 1;
        padding: 0 12px;
    }

    .registry-details-tabs .details-tab > span:not(.tab-count):not(.paw-group) {
        display: none;
    }

    .registry-details-tab-host {
        padding: 14px;
    }
}

/* ==========================================================
   SHARED DETAILS ACTIONS
   ========================================================== */

.registry-action-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.registry-action-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.registry-action-button:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.registry-action-button-primary {
    color: #fff;
    background: var(--club-burgundy);
    border-color: var(--club-burgundy);
}

.registry-action-button-primary:hover {
    color: #fff;
    background: var(--club-burgundy-dark);
    border-color: var(--club-burgundy-dark);
    box-shadow: 0 4px 12px rgba(148, 19, 40, .16);
}

.registry-action-button-secondary {
    color: #65574e;
    background: #fffdf9;
    border-color: #d8cec2;
}

.registry-action-button-secondary:hover {
    color: var(--club-burgundy);
    background: #fbf6ed;
    border-color: #cdbfae;
}

.registry-action-button-danger {
    color: #a62939;
    background: #fffdf9;
    border-color: rgba(166, 41, 57, .30);
}

.registry-action-button-danger:hover:not(:disabled) {
    color: #fff;
    background: #a62939;
    border-color: #a62939;
}

.registry-details-decoration-icon {
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
    color: #c19d49;
}

.registry-details-decoration-icon > i {
    font-size: 10px;
}

@media (max-width: 700px) {
    .registry-details-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .registry-action-button {
        flex: 1 1 auto;
    }
}

/* ==========================================================
   DETAILS HEADING - MOBILE NORMALIZATION
   ========================================================== */
@media (max-width: 768px) {
    .registry-details-heading-group {
        width: 100%;
        align-items: center;
    }

    .registry-details-header.registry-form-heading {
        align-items: flex-start;
    }

    .registry-details-actions {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .registry-details-heading-group {
        gap: 12px;
    }

    .registry-page-heading-leading {
        align-self: flex-start;
    }
}
