/* ==================== Edit Profile Modal ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    transform: scale(0.96) translateY(20px);
    animation: modalSpring 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSpring {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.edit-profile-modal {
    padding: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.modal-btn-cancel,
.modal-btn-save {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-btn-cancel {
    color: #86868b;
}

.modal-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.modal-btn-save {
    color: #007aff;
    font-weight: 600;
}

.modal-btn-save:hover {
    background: rgba(0, 122, 255, 0.1);
}

.modal-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-body {
    padding: 24px;
}

/* Profile Photo Section */
.profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.section-label {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 16px;
}

.profile-photo-upload {
    position: relative;
    width: 120px;
    height: 120px;
    cursor: pointer;
}

.profile-photo-upload img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 0, 0, 0.1);
    transition: filter 0.2s ease;
}

.profile-photo-upload:hover img {
    filter: brightness(0.9);
}

.photo-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007aff;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.photo-upload-btn:hover {
    background: #0051d5;
    transform: scale(1.1);
}

.photo-upload-btn svg {
    width: 20px;
    height: 20px;
    color: white;
    stroke-width: 2;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.field-description {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 12px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    cursor: text;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007aff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #86868b;
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .profile-photo-upload {
        width: 100px;
        height: 100px;
    }

    .photo-upload-btn {
        width: 36px;
        height: 36px;
    }

    .photo-upload-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ==================== Upload Video Modal Overrides ==================== */
#upload-modal-overlay .modal-content.upload-modal-content {
    max-width: 950px;
    width: 95%;
}

#upload-modal-overlay .modal-header {
    border-bottom: none !important;
}

#upload-modal-overlay .upload-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
    text-align: left;
}

#upload-modal-overlay .upload-info-card {
    background: #fbfbfd;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

#upload-modal-overlay .upload-info-card h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
}

#upload-modal-overlay .upload-info-card p {
    margin: 0;
    font-size: 14px;
    color: #86868b;
    line-height: 1.4;
}

#upload-modal-overlay .info-icon {
    flex-shrink: 0;
    color: #1d1d1f;
}

#upload-modal-overlay .upload-info-card.warning {
    grid-column: 1 / -1;
    background: #fff9e6;
    border-color: #ffe680;
}

#upload-modal-overlay .upload-info-card.warning .info-icon {
    color: #ff9500;
}

@media (max-width: 768px) {
    #upload-modal-overlay .modal-content.upload-modal-content {
        max-width: 95%;
        margin: 0;
        height: 100%;
        border-radius: 0;
    }

    #upload-modal-overlay .upload-info-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin: 20px 0;
    }

    #upload-modal-overlay .upload-info-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 12px;
        gap: 8px;
    }

    #upload-modal-overlay .upload-info-card.warning {
        grid-column: 1 / -1;
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        padding: 12px;
    }

    #upload-modal-overlay .upload-info-card h4 {
        font-size: 13px;
    }

    #upload-modal-overlay .upload-info-card p {
        font-size: 11px;
    }
}