/* Modal Component Styles */

/* ==================== Base Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Modal Close Button ==================== */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    font-size: 1.25rem;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background: #E5E7EB;
    color: #374151;
}

/* ==================== Modal Typography ==================== */
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #134E4A;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.modal-subtitle {
    color: #6B7280;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: #9CA3AF;
    margin-top: 1rem;
}

/* ==================== Modal Form Elements ==================== */
.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.modal .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    background: white;
    color: #111827;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal .form-input:focus {
    outline: none;
    border-color: #0D9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.modal .form-input::placeholder {
    color: #9CA3AF;
}

.modal .form-input[readonly] {
    background: #F3F4F6;
    cursor: not-allowed;
}

.modal select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

.modal textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ==================== Modal Checkbox ==================== */
.form-checkbox-group {
    margin-bottom: 1.5rem;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 1rem;
    height: 1rem;
    accent-color: #0D9488;
}

.form-checkbox label {
    font-size: 0.875rem;
    color: #6B7280;
}

.form-checkbox label a {
    color: #0D9488;
    text-decoration: underline;
}

/* ==================== Modal Buttons ==================== */
.modal .btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: #0D9488;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal .btn-primary:hover {
    background: #0F766E;
}

.modal .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.modal .btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.modal .btn-google:hover {
    background: #F9FAFB;
}

/* ==================== Modal Divider ==================== */
.modal-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E5E7EB;
}

.modal-divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
    color: #9CA3AF;
}

/* ==================== Success Message ==================== */
.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 0.5rem;
}

.success-text {
    color: #6B7280;
}

/* ==================== Dark Mode ==================== */
.dark .modal-content {
    background: #1F2937;
}

.dark .modal-close {
    background: #374151;
    color: #9CA3AF;
}

.dark .modal-close:hover {
    background: #4B5563;
    color: white;
}

.dark .modal-title {
    color: white;
}

.dark .modal-subtitle {
    color: #9CA3AF;
}

.dark .modal .form-label {
    color: #D1D5DB;
}

.dark .modal .form-input {
    background: #374151;
    border-color: #4B5563;
    color: white;
}

.dark .modal .form-input::placeholder {
    color: #6B7280;
}

.dark .modal .form-input[readonly] {
    background: #1F2937;
}

.dark .modal .form-input:focus {
    border-color: #14B8A6;
}

.dark .form-checkbox label {
    color: #9CA3AF;
}

.dark .modal-divider span {
    color: #6B7280;
}

.dark .modal-divider::before,
.dark .modal-divider::after {
    border-color: #374151;
}

.dark .modal .btn-google {
    background: #374151;
    border-color: #4B5563;
    color: white;
}

.dark .modal .btn-google:hover {
    background: #4B5563;
}

.dark .modal-footer-text {
    color: #6B7280;
}
