/* Phone Binding Modal Styles */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #fff;
    margin: 0;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2001;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-body {
    color: #666;
    line-height: 1.6;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #07C160;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
}

.sms-input-container {
    display: flex;
    gap: 10px;
}

.sms-input-container .form-control {
    flex: 1;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #07C160;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #06a854;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e9ecef;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    display: none;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: block;
}

/* Phone Binding Modal Styles (legacy classes for backward compatibility) */
.phone-bind-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.phone-bind-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2001;
}

.phone-bind-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.phone-bind-close:hover {
    color: #333;
}

.phone-bind-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.phone-bind-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
    text-align: center;
}

.phone-bind-form .form-group {
    margin-bottom: 20px;
}

.phone-bind-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.phone-bind-form input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.phone-bind-form input[type="tel"]:focus {
    outline: none;
    border-color: #07C160;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
}

.sms-input-container {
    display: flex;
    gap: 10px;
}

.sms-input-container input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.sms-input-container input:focus {
    outline: none;
    border-color: #07C160;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
}

.sms-send-link {
    display: inline-block;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #07C160;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-width: 120px;
}

.sms-send-link:hover:not(:disabled) {
    background-color: #e9ecef;
    color: #06a854;
}

.sms-send-link:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.phone-bind-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.phone-bind-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.phone-bind-primary {
    background-color: #07C160;
    color: white;
}

.phone-bind-primary:hover:not(:disabled) {
    background-color: #06a854;
}

.phone-bind-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.phone-bind-secondary:hover {
    background-color: #e9ecef;
}

.phone-bind-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Bind Status Banner */
.bind-status-banner {
    background-color: #fff8e6;
    border: 1px solid #ffd54f;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bind-status-icon {
    font-size: 24px;
    color: #ff9800;
}

.bind-status-content {
    flex: 1;
}

.bind-status-title {
    margin: 0 0 4px 0;
    color: #ff9800;
    font-weight: 600;
    font-size: 16px;
}

.bind-status-description {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.bind-status-action {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bind-status-action:hover {
    background-color: #f57c00;
}

/* Phone Bind Prompt Styles */
.phone-bind-prompt {
    background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(255, 232, 135, 0.3);
}

.prompt-content {
    flex: 1;
}

.phone-bind-prompt h4 {
    margin: 0 0 10px 0;
    color: #d9a72f;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-bind-prompt p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.phone-bind-prompt .btn {
    margin-right: 10px;
    min-width: 100px;
}

.phone-bind-prompt .btn:last-child {
    margin-right: 0;
}

/* Responsive adjustments for phone bind prompt */
@media (max-width: 768px) {
    .phone-bind-prompt {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .prompt-content {
        text-align: center;
    }
    
    .phone-bind-prompt h4 {
        justify-content: center;
    }
    
    .phone-bind-prompt .btn {
        margin: 5px;
        width: 100%;
    }
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .phone-bind-modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }
    
    .sms-input-container {
        flex-direction: column;
    }
    
    .sms-input-container input,
    .sms-send-link {
        width: 100%;
    }
    
    .phone-bind-actions {
        flex-direction: column;
    }
}