/* WordPress Phone Auth Plugin Styles */

.phone-auth-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f1f1f1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin: 0 auto;
}

.phone-auth-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
    padding: 30px;
    text-align: center;
}

.auth-logo h1 {
    color: #23282d;
    font-size: 24px;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.auth-step h2 {
    color: #23282d;
    font-size: 20px;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.auth-step p {
    color: #72777c;
    font-size: 14px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #23282d;
    font-size: 14px;
    font-weight: 500;
}

.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-group input[type="tel"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.checkbox-group {
    text-align: left;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    color: #23282d;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.privacy-link {
    color: #0073aa;
    text-decoration: none;
}

.privacy-link:hover {
    text-decoration: underline;
}

/* Privacy Notice Styles */
.privacy-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
    border-left: 4px solid #f39c12;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.privacy-notice-content h4 {
    color: #856404;
    font-size: 16px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.privacy-notice-content p {
    color: #856404;
    font-size: 14px;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.privacy-notice-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.privacy-notice-buttons .btn-primary,
.privacy-notice-buttons .btn-secondary,
.privacy-notice-buttons .btn-decline {
    margin: 0;
    padding: 8px 16px;
    font-size: 13px;
    min-width: auto;
    flex: 1;
    min-width: 80px;
}

.btn-decline {
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-decline:hover {
    background: #c62d2d;
}

/* Privacy Modal Styles */
.privacy-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.privacy-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.privacy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 8px 8px 0 0;
}

.privacy-modal-header h3 {
    margin: 0;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
}

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

.privacy-close:hover {
    background: #f0f0f0;
    color: #000;
}

.privacy-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.privacy-content h4 {
    color: #0073aa;
    font-size: 16px;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.privacy-content h4:first-child {
    margin-top: 0;
}

.privacy-content p {
    color: #23282d;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.privacy-content ul {
    margin: 10px 0 15px 20px;
    padding: 0;
}

.privacy-content li {
    color: #23282d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 5px;
}

.privacy-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.privacy-modal-footer .btn-primary,
.privacy-modal-footer .btn-secondary {
    margin: 0;
    min-width: 100px;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-primary {
    background: #0073aa;
    color: #fff;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #f1f1f1;
    color: #23282d;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

.call-number {
    margin: 20px 0;
}

.call-link {
    display: inline-block;
    font-size: 24px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
    padding: 15px 20px;
    border: 2px solid #0073aa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.call-link:hover {
    background: #0073aa;
    color: #fff;
    transform: translateY(-2px);
}

.call-instruction {
    font-size: 12px;
    color: #72777c;
    margin-top: 10px;
}

.loading-spinner {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f1f1;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #72777c;
    font-size: 14px;
    margin: 0;
}

.error-message {
    background: #fcf2f2;
    border: 1px solid #dc3232;
    border-radius: 4px;
    padding: 12px;
    margin-top: 20px;
    color: #dc3232;
    font-size: 14px;
}

.success-message {
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 12px;
    margin-top: 20px;
    color: #0073aa;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .privacy-notice-buttons {
        flex-direction: column;
    }
    
    .privacy-notice-buttons .btn-primary,
    .privacy-notice-buttons .btn-secondary,
    .privacy-notice-buttons .btn-decline {
        flex: none;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .privacy-notice-buttons .btn-decline {
        margin-bottom: 0;
    }
    
    .privacy-modal {
        padding: 10px;
    }
    
    .privacy-modal-content {
        max-height: 95vh;
    }
    
    .privacy-modal-header,
    .privacy-modal-body,
    .privacy-modal-footer {
        padding: 15px 20px;
    }
    
    .privacy-modal-header h3 {
        font-size: 16px;
    }
    
    .privacy-modal-footer {
        flex-direction: column;
    }
    
    .privacy-modal-footer .btn-primary,
    .privacy-modal-footer .btn-secondary {
        width: 100%;
    }
    
    .phone-auth-container {
        padding: 10px;
    }
    
    .phone-auth-form {
        padding: 20px;
    }
    
    .auth-logo h1 {
        font-size: 20px;
    }
    
    .auth-step h2 {
        font-size: 18px;
    }
    
    .call-link {
        font-size: 20px;
        padding: 12px 16px;
    }
    
    .form-group input[type="tel"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 360px) {
    .phone-auth-form {
        padding: 15px;
    }
    
    .call-link {
        font-size: 18px;
        padding: 10px 12px;
        word-break: break-all;
    }
}

/* Loading states */
.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s ease infinite;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .spinner,
    .btn-primary.loading::after,
    .call-link {
        animation: none;
    }
    
    .call-link:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .phone-auth-form {
        border: 2px solid #000;
    }
    
    .form-group input[type="tel"] {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
}