/* Password Modal Styles */
:root {
    --modal-background: #ffffff;
    --modal-border: #d2d2d7;
    --modal-shadow: rgba(0, 0, 0, 0.1);
    --primary-text: #1d1d1f;
    --secondary-text: #86868b;
    --input-border: #d2d2d7;
    --input-border-focus: var(--button-color);
    --button-primary: var(--button-color);
    --button-primary-hover: var(--button-hover-color);
    --font-family: "Helvetica Neue", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Dark Mode Input Fields - Enhanced specificity */
[data-theme="dark"] .password-form-input,
[data-actual-theme="dark"] .password-form-input,
[data-theme="dark"] input.password-form-input,
[data-actual-theme="dark"] input.password-form-input,
[data-theme="dark"] #currentPasswordInput,
[data-theme="dark"] #newPasswordInput,
[data-theme="dark"] #confirmPasswordInput,
[data-actual-theme="dark"] #currentPasswordInput,
[data-actual-theme="dark"] #newPasswordInput,
[data-actual-theme="dark"] #confirmPasswordInput {
    background: #2c2c2e !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f2f2f7 !important;
}

[data-theme="dark"] .password-form-input::placeholder,
[data-actual-theme="dark"] .password-form-input::placeholder,
[data-theme="dark"] input.password-form-input::placeholder,
[data-actual-theme="dark"] input.password-form-input::placeholder,
[data-theme="dark"] #currentPasswordInput::placeholder,
[data-theme="dark"] #newPasswordInput::placeholder,
[data-theme="dark"] #confirmPasswordInput::placeholder,
[data-actual-theme="dark"] #currentPasswordInput::placeholder,
[data-actual-theme="dark"] #newPasswordInput::placeholder,
[data-actual-theme="dark"] #confirmPasswordInput::placeholder {
    color: #98989d !important;
}

/* Dark Mode for Password Modal */
[data-theme="dark"],
[data-actual-theme="dark"] {
    --modal-background: #1c1c1e;
    --modal-border: rgba(255, 255, 255, 0.15);
    --modal-shadow: rgba(0, 0, 0, 0.3);
    --primary-text: #f2f2f7;
    --secondary-text: #98989d;
    --input-border: rgba(255, 255, 255, 0.2);
    --input-border-focus: var(--button-color);
}

/* Dark Mode Icon */
[data-theme="dark"] .password-modal-icon,
[data-actual-theme="dark"] .password-modal-icon {
    background: #2c2c2e !important;
}

/* Dark Mode Cancel Button */
[data-theme="dark"] .password-cancel-button,
[data-actual-theme="dark"] .password-cancel-button {
    background: #2c2c2e !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f2f2f7 !important;
}

[data-theme="dark"] .password-cancel-button:hover,
[data-actual-theme="dark"] .password-cancel-button:hover {
    background: #3c3c3e !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Dark Mode Password Info Section */
[data-theme="dark"] .password-info-item,
[data-actual-theme="dark"] .password-info-item {
    background: #2c2c2e !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Modal Overlay */
.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.password-modal {
    width: 690px;
    max-height: 90vh;
    background: var(--modal-background);
    border-radius: 20px;
    box-shadow: 0 8px 40px var(--modal-shadow);
    position: relative;
    font-family: var(--font-family);
    transform: scale(0.8) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 20px;
}

.password-modal-overlay.show .password-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.password-modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    flex-shrink: 0;
}

.password-modal-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--primary-text);
    margin: 0;
    font-family: var(--font-family);
}

.password-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.password-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.password-modal-close img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* Modal Content */
.password-modal-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.password-modal-icon {
    width: 80px;
    height: 80px;
    background: #f5f5f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.password-modal-icon img {
    width: 40px;
    height: 40px;
    filter: var(--icon-filter);
}

/* Password Info Section */
.password-info-section {
    margin-bottom: 32px;
    width: 100%;
    max-width: 400px;
}

.password-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 8px;
}

.password-info-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text);
}

.password-info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-text);
}

/* Form Styles */
.password-modal-form {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-form-group {
    display: flex;
    flex-direction: column;
}

.password-form-input {
    padding: 16px 20px;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 17px;
    font-family: var(--font-family);
    background: var(--modal-background);
    color: var(--primary-text);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.password-form-input:focus {
    outline: none;
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.password-form-input::placeholder {
    color: var(--secondary-text);
    font-weight: 400;
}

/* Error Styles */
.password-modal-error {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    border: 1px solid;
}

/* Button Container */
.password-button-container {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.password-cancel-button,
.password-save-button {
    width: 154px;
    height: 36px;
    min-width: 154px;
    min-height: 36px;
    padding: 0;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.password-cancel-button {
    background: #f5f5f7;
    color: var(--primary-text);
}

.password-cancel-button:hover {
    background: #e8e8ed;
}

.password-save-button {
    background: var(--button-primary);
    color: white;
}

.password-save-button:hover:not(:disabled) {
    background: var(--button-primary-hover);
}

.password-save-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-spinner {
    display: inline-block;
}

.spinner {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.spinner circle {
    transform-origin: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .password-modal {
        width: 95%;
        height: auto;
        max-height: 90vh;
        margin: 20px;
    }
    
    .password-modal-content {
        padding: 20px;
    }
    
    .password-modal-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .password-modal-icon img {
        width: 30px;
        height: 30px;
    }
    
    .password-form-input {
        padding: 14px 16px;
        font-size: 16px; /* iOS zoom prevention */
    }
    
    .password-button-container {
        flex-direction: column;
    }
    
    .password-cancel-button,
    .password-save-button {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .password-modal-content {
        padding: 16px;
    }
    
    .password-modal-title {
        font-size: 17px;
    }
    
    .password-info-item {
        padding: 10px 12px;
    }
    
    .password-info-label,
    .password-info-value {
        font-size: 13px;
    }
}



