/* ==========================================================
   DOG REGISTRY — MEDIA / DIALOG DESIGN SYSTEM
   Shared by dog gallery, dog profile-image picker and
   member profile-image picker.
   ========================================================== */

.registry-media-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(31, 20, 17, 0.62);
    backdrop-filter: blur(4px);
}

.registry-media-modal,
.registry-media-confirm-dialog {
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    background: var(--surface-primary, #fffdf9);
    border: 1px solid var(--club-border, #e4dbcb);
    border-radius: 14px;
    box-shadow: 0 22px 60px rgba(36, 20, 16, 0.25);
}

.registry-media-modal-lg {
    width: min(820px, 100%);
}

.registry-media-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--club-border, #e4dbcb);
}

.registry-media-modal-header h3 {
    margin: 3px 0 0;
    color: var(--club-brown, #3c281f);
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: 24px;
    line-height: 1.2;
}

.registry-media-eyebrow {
    color: #9b7b36;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.registry-media-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--club-muted, #746b64);
    background: transparent;
    border: 1px solid var(--club-border, #e4dbcb);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.15s ease;
}

.registry-media-close:hover:not(:disabled) {
    color: var(--club-burgundy, #941328);
    background: #fbf5f3;
    border-color: rgba(148, 19, 40, 0.30);
}

.registry-media-close:disabled {
    opacity: .45;
    cursor: default;
}

.registry-media-modal-body {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    padding: 22px 24px;
}

.registry-media-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: #fbf8f2;
    border-top: 1px solid var(--club-border, #e4dbcb);
}

.registry-media-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    color: var(--club-muted, #746b64);
    background: #fbf8f2;
    border: 1px solid var(--club-border, #e4dbcb);
    border-radius: 8px;
    font-size: 13px;
}

.registry-media-loading-centered {
    min-height: 180px;
    justify-content: center;
    margin-top: 0;
    background: transparent;
    border: 0;
}

.registry-media-loading .spinner-border {
    color: var(--club-burgundy, #941328);
}

.registry-media-error {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
    padding: 13px 15px;
    color: #7d1828;
    background: #fff5f6;
    border: 1px solid #e8bdc4;
    border-radius: 8px;
    font-size: 13px;
}

.registry-media-error > i {
    margin-top: 2px;
}

.registry-media-error-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.registry-media-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 24px;
    text-align: center;
    color: var(--club-muted, #746b64);
    background: #fbf8f2;
    border: 1px dashed #d8cdbc;
    border-radius: 10px;
}

.registry-media-empty > i {
    margin-bottom: 10px;
    color: #b49555;
    font-size: 28px;
}

.registry-media-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 24px;
    text-align: center;
    color: var(--club-text, #33251f);
    background: #fcfaf5;
    border: 1px dashed #cdbd9d;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.registry-media-upload-zone:hover {
    background: #fffaf0;
    border-color: var(--club-gold, #d3ad54);
    transform: translateY(-1px);
}

.registry-media-upload-zone > i {
    margin-bottom: 10px;
    color: var(--club-burgundy, #941328);
    font-size: 27px;
}

.registry-media-upload-title {
    font-weight: 700;
}

.registry-media-upload-help {
    margin-top: 5px;
    color: var(--club-muted, #746b64);
    font-size: 11px;
}

.registry-media-confirm-dialog {
    width: min(440px, 100%);
    padding: 28px;
    text-align: center;
    overflow: visible;
}

.registry-media-confirm-dialog h3 {
    margin: 14px 0 8px;
    color: var(--club-brown, #3c281f);
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
}

@media (max-width: 640px) {
    .registry-media-backdrop {
        align-items: flex-end;
        padding: 12px;
    }

    .registry-media-modal {
        max-height: calc(100vh - 24px);
        border-radius: 14px 14px 10px 10px;
    }

    .registry-media-modal-header,
    .registry-media-modal-body,
    .registry-media-modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .registry-media-error-content {
        flex-direction: column;
    }
}
