/**
 * AUANI Frontend Styles
 * 
 * Clean, modern design with AUANI brand colors and sharp geometry.
 * Spanish-first interface with friendly, welcoming aesthetics.
 * 
 * Color Palette:
 * - Light: #f3fcf0
 * - Dark: #0a0a0a
 * - Form Background: #f3fcf0
 * - Accent/Links: #9fcc2f
 * - Alt Dark: #295136
 * 
 * @package AUANI
 * @since 1.0.1
 */

/* ==========================================================================
   Pricing Card
   ========================================================================== */

.auani-pricing-card {
    background: #ffffff;
    border: 2px solid #295136;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(10, 10, 10, 0.1);
}

.auani-pricing-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3fcf0;
}

.auani-pricing-header h3 {
    color: #0a0a0a;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.auani-pricing-header p {
    color: #295136;
    font-size: 16px;
    margin: 0;
}

.auani-pricing-breakdown {
    margin: 20px 0;
}

.auani-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3fcf0;
}

.auani-pricing-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 18px;
    color: #295136;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #295136;
}

.auani-pricing-label {
    color: #0a0a0a;
    font-size: 15px;
}

.auani-pricing-value {
    color: #295136;
    font-weight: 600;
    font-size: 16px;
}

/* Surge Pricing Alerts */
.auani-surge-alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-left: 4px solid;
    background: #f3fcf0;
}

.auani-surge-green {
    border-left-color: #9fcc2f;
    color: #295136;
}

.auani-surge-orange {
    border-left-color: #ff9800;
    color: #e65100;
}

.auani-surge-red {
    border-left-color: #f44336;
    color: #c62828;
}

.auani-surge-darkred {
    border-left-color: #b71c1c;
    color: #7f0000;
}

.auani-surge-label {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
}

.auani-surge-message {
    font-size: 14px;
    margin: 5px 0 0 0;
}

/* ==========================================================================
   Customer Form
   ========================================================================== */

.auani-form {
    background: #ffffff;
    border: 2px solid #295136;
    padding: 30px;
    margin: 20px 0;
    max-width: 700px;
}

.auani-form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f3fcf0;
}

.auani-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.auani-section-title {
    color: #295136;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.auani-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.auani-form-field {
    margin-bottom: 20px;
}

.auani-field-full {
    flex: 1 1 100%;
}

.auani-field-half {
    flex: 1 1 calc(50% - 7.5px);
}

.auani-form-field label {
    display: block;
    color: #0a0a0a;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.auani-input,
.auani-textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    color: #0a0a0a;
    background: #f3fcf0;
    border: 2px solid #295136;
    border-radius: 0; /* Clean geometry - no rounded corners */
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auani-input:focus,
.auani-textarea:focus {
    outline: none;
    border-color: #9fcc2f;
    background: #ffffff;
}

/* Error State for Inline Validation */
.auani-input.auani-error,
.auani-textarea.auani-error {
    border: 3px solid #f44336 !important; /* Bold red border */
    box-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

.auani-input[readonly] {
    background: #f3fcf0;
    cursor: default;
    opacity: 0.9;
}

.auani-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.auani-field-hint {
    display: block;
    color: #f3fcf0;
    font-size: 14px;
    margin-top: 6px;
    font-style: italic;
}

/* Address Fields Container */
.auani-address-fields {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #295136;
}

.auani-address-fields .auani-form-row:last-child {
    margin-bottom: 0;
}

/* Character Counter */
.auani-char-counter {
    text-align: right;
    color: #295136;
    font-size: 13px;
    margin-top: 5px;
}

.auani-char-counter.warning {
    color: #ff9800;
    font-weight: 600;
}

.auani-char-counter.danger {
    color: #f44336;
    font-weight: 700;
}

/* Price Display */
.auani-price-display {
    background: linear-gradient(135deg, #9fcc2f 0%, #295136 100%);
    color: #ffffff;
    padding: 20px;
    margin: 20px 0;
    display: none;
}

.auani-price-display h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.auani-price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.auani-price-info:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 20px;
    font-weight: 700;
}

.auani-price-label {
    font-size: 15px;
}

.auani-price-value {
    font-weight: 600;
    font-size: 16px;
}

/* Buttons */
.auani-btn-primary {
    width: 100%;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #9fcc2f 0%, #295136 100%);
    border: none;
    border-radius: 0; /* Clean geometry - no rounded corners */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auani-btn-primary:hover {
    background: linear-gradient(135deg, #295136 0%, #9fcc2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(10, 10, 10, 0.2);
}

.auani-btn-primary:active {
    transform: translateY(0);
}

.auani-btn-primary:disabled,
.auani-btn-primary.loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auani-btn-primary.loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Messages */
.auani-messages {
    margin: 20px 0;
}

.auani-message {
    padding: 15px 20px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.auani-message-success {
    background: #f3fcf0;
    border-left-color: #9fcc2f;
    color: #295136;
}

.auani-message-error {
    background: #ffebee;
    border-left-color: #f44336;
    color: #c62828;
}

.auani-message-info {
    background: #f3fcf0;
    border-left-color: #295136;
    color: #0a0a0a;
}

/* ==========================================================================
   Registration Modal
   ========================================================================== */

.auani-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.auani-modal-overlay.active {
    display: flex;
}

.auani-modal {
    background: #ffffff;
    border: 3px solid #295136;
    max-width: 500px;
    width: 90%;
    padding: 30px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auani-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.auani-modal-header h3 {
    color: #295136;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.auani-modal-body {
    margin-bottom: 25px;
}

.auani-modal-body p {
    color: #0a0a0a;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.auani-modal-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.auani-btn-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #295136;
    background: #f3fcf0;
    border: 2px solid #295136;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auani-btn-secondary:hover {
    background: #295136;
    color: #ffffff;
}

.auani-btn-link {
    background: none;
    border: none;
    color: #9fcc2f;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 10px;
}

.auani-btn-link:hover {
    color: #295136;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .auani-pricing-card,
    .auani-form {
        padding: 20px;
    }
    
    .auani-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auani-field-half {
        flex: 1 1 100%;
    }
    
    .auani-price-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .auani-modal {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .auani-pricing-header h3 {
        font-size: 20px;
    }
    
    .auani-section-title {
        font-size: 18px;
    }
    
    .auani-btn-primary {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.auani-input.auani-disabled {
    background-color: #e8e8e8;
    color: #295136;
    font-weight: 600;
    cursor: not-allowed;
    border-color: #295136;
}

.auani-input:focus {.auani-textarea:focus,
.auani-btn-primary:focus,
.auani-btn-secondary:focus {
    outline: 3px solid #9fcc2f;
    outline-offset: 2px;
}

/* Screen reader only */
.auani-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Warning for missing address fields */
.auani-address-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

/* Highlight missing fields */
.auani-field-missing {
    border-color: #ffc107 !important;
    background-color: #fffbf0 !important;
}

.auani-field-missing:focus {
    border-color: #ff9800 !important;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

/* Error field highlighting - red border */
.auani-input.auani-error,
input.auani-error,
textarea.auani-error,
select.auani-error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

.auani-input.auani-error:focus,
input.auani-error:focus,
textarea.auani-error:focus,
select.auani-error:focus {
    border-color: #c82333 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
    outline: none;
}