﻿/* ============================================
   CUSTOMER QUICK ADD - AGENDRIX STYLE
   Complete Custom Styling
   ============================================ */

/* ====== CSS VARIABLES ====== */
:root {
    /* Primary Colors */
    --cqa-primary: 13, 43, 53;
    --cqa-primary-hover: 20, 60, 70;
    --cqa-primary-light: 229, 237, 239;
    /* Gold Accent */
    --cqa-gold: 212, 175, 55;
    --cqa-gold-hover: 200, 160, 45;
    --cqa-gold-light: 254, 251, 235;
    /* Status Colors */
    --cqa-success: 42, 157, 143;
    --cqa-success-light: 209, 250, 229;
    --cqa-danger: 239, 68, 68;
    --cqa-danger-light: 254, 226, 226;
    /* Neutral Colors */
    --cqa-white: 255, 255, 255;
    --cqa-gray-50: 248, 249, 250;
    --cqa-gray-100: 243, 244, 246;
    --cqa-gray-200: 229, 231, 235;
    --cqa-gray-300: 209, 213, 219;
    --cqa-gray-400: 156, 163, 175;
    --cqa-gray-500: 107, 114, 128;
    --cqa-gray-600: 75, 85, 99;
    --cqa-gray-700: 55, 65, 81;
    --cqa-gray-800: 31, 41, 55;
    --cqa-gray-900: 17, 24, 39;
    /* Spacing */
    --cqa-space-1: 0.25rem;
    --cqa-space-2: 0.5rem;
    --cqa-space-3: 0.75rem;
    --cqa-space-4: 1rem;
    --cqa-space-5: 1.25rem;
    --cqa-space-6: 1.5rem;
    /* Border & Shadow */
    --cqa-radius: 0.5rem;
    --cqa-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --cqa-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    /* Transitions */
    --cqa-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== CONTAINER ====== */
.customer-quick-add {
    padding: var(--cqa-space-4);
}

/* ====== CUSTOMER TYPE SELECTOR ====== */
.customer-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--cqa-space-3);
    margin-bottom: var(--cqa-space-5);
}

.type-option {
    cursor: pointer;
    margin: 0;
}

    .type-option input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--cqa-space-2);
    padding: var(--cqa-space-4);
    background: rgb(var(--cqa-gray-50));
    border: 2px solid rgb(var(--cqa-gray-200));
    border-radius: var(--cqa-radius);
    transition: var(--cqa-transition);
    cursor: pointer;
}

    .type-card i {
        font-size: 1.5rem;
        color: rgb(var(--cqa-gray-400));
        transition: var(--cqa-transition);
    }

    .type-card span {
        font-size: 0.875rem;
        font-weight: 500;
        color: rgb(var(--cqa-gray-700));
        transition: var(--cqa-transition);
    }

.type-option:hover .type-card {
    background: rgb(var(--cqa-gray-100));
    border-color: rgb(var(--cqa-gray-300));
}

.type-option input[type="radio"]:checked + .type-card {
    background: rgb(var(--cqa-gold-light));
    border-color: rgb(var(--cqa-gold));
    box-shadow: 0 0 0 3px rgba(var(--cqa-gold), 0.1);
}

    .type-option input[type="radio"]:checked + .type-card i {
        color: rgb(var(--cqa-gold));
    }

    .type-option input[type="radio"]:checked + .type-card span {
        color: rgb(var(--cqa-gray-900));
        font-weight: 600;
    }

/* ====== VALIDATION MESSAGES ====== */
.validation-errors {
    padding: var(--cqa-space-3);
    background: rgb(var(--cqa-danger-light));
    border: 1px solid rgb(var(--cqa-danger));
    border-radius: var(--cqa-radius);
    margin-bottom: var(--cqa-space-4);
}

.error-message {
    display: flex;
    align-items: center;
    gap: var(--cqa-space-2);
    color: rgb(var(--cqa-danger));
    font-size: 0.813rem;
    margin-bottom: var(--cqa-space-1);
}

    .error-message:last-child {
        margin-bottom: 0;
    }

.success-message {
    display: flex;
    align-items: center;
    gap: var(--cqa-space-2);
    padding: var(--cqa-space-3);
    background: rgb(var(--cqa-success-light));
    border: 1px solid rgb(var(--cqa-success));
    border-radius: var(--cqa-radius);
    color: rgb(var(--cqa-success));
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--cqa-space-4);
}

/* ====== FORM GRID ====== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--cqa-space-4);
    margin-bottom: var(--cqa-space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--cqa-space-2);
}

    .form-group.span-2 {
        grid-column: span 2;
    }

    .form-group label {
        font-size: 0.813rem;
        font-weight: 500;
        color: rgb(var(--cqa-gray-700));
        display: flex;
        align-items: center;
        gap: var(--cqa-space-1);
    }

.required {
    color: rgb(var(--cqa-danger));
}

.form-control {
    width: 100%;
    padding: 0.625rem var(--cqa-space-3);
    font-size: 0.875rem;
    color: rgb(var(--cqa-gray-900));
    background: rgb(var(--cqa-white));
    border: 1px solid rgb(var(--cqa-gray-300));
    border-radius: var(--cqa-radius);
    transition: var(--cqa-transition);
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: rgb(var(--cqa-primary));
        box-shadow: 0 0 0 3px rgba(var(--cqa-primary), 0.1);
    }

    .form-control::placeholder {
        color: rgb(var(--cqa-gray-400));
    }

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
}

/* ====== SECTIONS ====== */
.address-section,
.additional-info {
    padding: var(--cqa-space-4);
    background: rgb(var(--cqa-gray-50));
    border: 1px solid rgb(var(--cqa-gray-200));
    border-radius: var(--cqa-radius);
    margin-bottom: var(--cqa-space-4);
}

    .address-section h4,
    .additional-info h4 {
        display: flex;
        align-items: center;
        gap: var(--cqa-space-2);
        font-size: 1rem;
        font-weight: 600;
        color: rgb(var(--cqa-gray-900));
        margin: 0 0 var(--cqa-space-4) 0;
    }

        .address-section h4 i {
            color: rgb(var(--cqa-primary));
        }

/* ====== CHECKBOX GROUP ====== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--cqa-space-3);
    padding: var(--cqa-space-4);
    background: rgb(var(--cqa-white));
    border: 1px solid rgb(var(--cqa-gray-200));
    border-radius: var(--cqa-radius);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--cqa-space-2);
    cursor: pointer;
    margin: 0;
    font-size: 0.875rem;
    color: rgb(var(--cqa-gray-700));
}

    .checkbox-label input[type="checkbox"] {
        width: 1.125rem;
        height: 1.125rem;
        cursor: pointer;
        accent-color: rgb(var(--cqa-gold));
    }

    .checkbox-label:hover {
        color: rgb(var(--cqa-gray-900));
    }

/* ====== ACTION BUTTONS ====== */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--cqa-space-3);
    padding-top: var(--cqa-space-4);
    border-top: 1px solid rgb(var(--cqa-gray-200));
}

/* Button styles now handled by unified buttons.css */

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .customer-quick-add {
        padding: var(--cqa-space-3);
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: var(--cqa-space-3);
    }

    .form-group.span-2 {
        grid-column: span 1;
    }

    .customer-type-selector {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column-reverse;
    }

        .action-buttons button {
            width: 100%;
        }
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.customer-quick-add {
    animation: fadeIn 0.3s ease-out;
}
