/* =============================================================
   CUSTOMER PAGE STYLES
   Layout styles for Customer Search, Detail and New Customer pages.
   Depends on CSS variables defined in root.css (--ev-* tokens).
   Component styles (badges, buttons) → components/badges.css,
   components/buttons.css
   See overrides/custom-syncfusion.css for all .e-* overrides.
   ============================================================= */


/* ============================================================
   CUSTOMER SEARCH PAGE
   ============================================================ */

/* ===== CUSTOMER CONTAINER ===== */
.customer-container {
    width: 100%;
}

/* ===== SEARCH SECTION CONTAINER ===== */
.search-section {
    background: var(--ev-white);
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ===== SEARCH HEADER ===== */
.search-header {
    background: var(--ev-white);
    padding: 16px 28px;
    margin: -24px -28px 20px -28px;
    border-radius: 12px 12px 0 0;
}

.search-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--ev-dark);
    margin: 0 0 6px 0;
    padding: 0;
}

.search-subtitle {
    font-size: 13px;
    color: var(--ev-gray-600);
    margin: 0;
    padding: 0;
}

/* ===== SEARCH FORM LAYOUT ===== */
.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

    .search-form .form-group {
        margin-bottom: 0;
    }

    .search-form .form-label {
        font-size: 12px;
        margin-bottom: 8px;
        display: block;
        color: var(--ev-dark);
        font-weight: 600;
    }

/* ===== SEARCH ACTIONS ===== */
.search-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

/* ===== RESULTS SECTION ===== */
.results-section {
    background: var(--ev-white);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: none;
}

    .results-section.active {
        display: block;
    }

/* ===== RESULTS HEADER ===== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ev-white);
    padding: 16px 28px;
    margin: -24px -28px 16px -28px;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid var(--ev-gray-200);
}

.results-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--ev-dark);
    margin: 0;
}

.results-count {
    font-size: 13px;
    color: var(--ev-gray-600);
    margin: 0;
}

/* ===== NO RESULTS STATE ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--ev-dark);
    margin-bottom: 12px;
}

.no-results-text {
    font-size: 15px;
    color: var(--ev-gray-600);
    margin-bottom: 32px;
}

/* ===== RESPONSIVE — SEARCH ===== */
@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .search-actions {
        flex-direction: column;
        gap: 8px;
    }

    .search-header {
        margin: -16px -24px 16px -24px;
        padding: 12px 24px;
    }

    .results-header {
        margin: -16px -24px 12px -24px;
        padding: 12px 24px;
    }
}


/* ============================================================
   CUSTOMER DETAIL PAGE
   ============================================================ */

/* ===== SUBHEADER ===== */
.customer-subheader {
    background: linear-gradient(135deg, var(--ev-primary), var(--ev-primary-dark));
    color: var(--ev-white);
    padding: 14px 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 12px;
}

    .customer-subheader .subheader-info {
        flex: 1;
    }

    .customer-subheader .subheader-label {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.9;
        margin-bottom: 3px;
    }

    .customer-subheader .subheader-value {
        font-family: 'Playfair Display', serif;
        font-size: 22px;
        font-weight: 700;
        margin-bottom: 3px;
    }

    .customer-subheader .subheader-type {
        font-size: 12px;
        opacity: 0.9;
        font-weight: 600;
    }

/* ============================================================
   CUSTOMER DETAIL — STICKY HEADER / BODY / FOOTER LAYOUT
   Same approach as EventDetails.razor
   ============================================================ */

.cd-page {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ev-gray-100);
    font-family: 'Work Sans', sans-serif;
    color: var(--ev-dark);
}

/* Sticky top bar — title + back button */
.cd-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    min-height: 117px;
    background: var(--ev-white);
    border-bottom: 1px solid var(--ev-gray-200);
    gap: 12px;
    flex-wrap: wrap;
}

.cd-heading h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--ev-dark);
}

.cd-subtitle {
    color: var(--ev-gray-600);
    font-size: 14px;
    margin: 0;
}

.cd-header-actions {
    display: inline-flex;
    align-items: center;
}

/* Sticky nav bar — section links */
.cd-nav {
    flex: 0 0 auto;
    background: var(--ev-white);
    border-bottom: 2px solid var(--ev-gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cd-nav .horizontal-nav-content {
    width: 100%;
    display: flex;
    gap: 0;
    overflow-x: auto;
}

/* Scrollable content area */
.cd-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 40px;
}

/* Sticky footer — save / cancel */
.cd-footer {
    flex: 0 0 auto;
    padding: 12px 40px 16px;
    background: var(--ev-white);
    border-top: 1px solid var(--ev-gray-200);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.cd-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cd-save-message {
    text-align: right;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .cd-header {
        padding: 20px 16px;
        min-height: unset;
    }

    .cd-body {
        padding: 16px;
    }

    .cd-footer {
        padding: 12px 16px;
    }

    .cd-footer-actions {
        flex-direction: column;
    }
}

/* ===== HORIZONTAL NAV ===== */
.horizontal-nav-content {
    width: 100%;
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.horizontal-nav-item {
    flex-shrink: 0;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--ev-gray-700);
    font-size: 12px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, background 0.3s;
    cursor: pointer;
    white-space: nowrap;
}

    .horizontal-nav-item:hover {
        color: var(--ev-primary);
        background: var(--ev-gray-100);
    }

    .horizontal-nav-item.active {
        color: var(--ev-primary);
        border-bottom-color: var(--ev-primary);
        background: var(--ev-gray-100);
    }

/* ===== DETAIL CONTAINER & CONTENT ===== */
.customer-detail-container {
    width: 100%;
}

.customer-content {
    background: var(--ev-white);
    border-radius: 20px;
    min-width: 0;
}

/* ===== SECTION CARDS ===== */
.section-content {
    background: var(--ev-white);
    border-radius: 24px;
    padding: 32px 40px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    scroll-margin-top: 80px;
}

    .section-content:first-of-type {
        border-radius: 0 0 24px 24px;
        margin-top: 0;
    }

.section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ev-gray-200);
}

.section-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ev-dark);
    margin-bottom: 4px;
}

.section-add-button {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--ev-primary);
    color: var(--ev-white);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .section-add-button:hover {
        background: var(--ev-primary-dark);
        transform: scale(1.05);
    }

.section-subtitle {
    font-size: 13px;
    color: var(--ev-gray-600);
}

/* ===== DETAIL FIELDS GRID ===== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.detail-field {
    background: var(--ev-gray-100);
    padding: 16px;
    border-radius: 12px;
    transition: background 0.2s;
}

    .detail-field:hover {
        background: var(--ev-gray-200);
    }

    .detail-field label {
        display: block;
        font-size: 11px;
        font-weight: 700;
        color: var(--ev-gray-600);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }

    .detail-field .value {
        font-size: 15px;
        font-weight: 600;
        color: var(--ev-dark);
        padding: 4px 0;
    }

/* ===== ACTION BAR ===== */
.action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: flex-start;
}

.comments-action-bar {
    flex-direction: column;
    align-items: stretch;
}

.new-comment-textarea {
    width: 100%;
    min-height: 80px;
}

/* ===== CONTACT ENTRIES (phones / emails / addresses) ===== */
.item-list {
    max-height: 600px;
    overflow-y: auto;
}

.contact-entry {
    background: var(--ev-gray-100);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--ev-primary);
    position: relative;
}

    .contact-entry.main {
        border-left-color: #2e7d32;
    }

.contact-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .contact-badge.main {
        background: #2e7d32;
        color: var(--ev-white);
        right: 80px;
    }

    .contact-badge.type {
        background: var(--ev-gray-300);
        color: var(--ev-gray-700);
    }

.contact-entry-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

    .contact-entry-actions .icon-medium {
        color: var(--ev-gray-600);
        transition: color 0.2s;
    }

        .contact-entry-actions .icon-medium:hover {
            color: var(--ev-primary);
        }

/* ===== COMMENT ITEMS ===== */
.item-card {
    background: var(--ev-gray-100);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--ev-primary);
    transition: background 0.2s;
}

    .item-card:hover {
        background: var(--ev-gray-200);
    }

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.item-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--ev-dark);
}

.item-date {
    font-size: 12px;
    color: var(--ev-gray-600);
    font-weight: 600;
}

.item-body {
    font-size: 14px;
    color: var(--ev-gray-700);
    line-height: 1.7;
}

/* ===== NO RELATED EVENTS ===== */
.no-related-events {
    text-align: center;
    padding: 40px 20px;
    color: var(--ev-gray-600);
    font-size: 14px;
}

/* ===== FOOTER ACTIONS ===== */
.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 40px;
    border-top: 2px solid var(--ev-gray-200);
    background: var(--ev-white);
    border-radius: 0 0 20px 20px;
}

/* ===== DIALOG FORM ===== */
.dialog-form-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}

.dialog-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .dialog-field label {
        font-size: 12px;
        font-weight: 700;
        color: var(--ev-gray-600);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.dialog-field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ev-dark);
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ===== RESPONSIVE — DETAIL ===== */
@media (max-width: 768px) {
    .customer-subheader {
        padding: 12px 16px;
    }

        .customer-subheader .subheader-value {
            font-size: 18px;
        }

    .section-content {
        padding: 20px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-nav-content {
        gap: 0;
    }

    .footer-actions {
        padding: 16px 20px;
        flex-direction: column-reverse;
    }
}


/* ============================================================
   NEW CUSTOMER PAGE
   ============================================================ */

.customer-form-container {
    width: 100%;
}

/* ===== FORM SECTION CARD ===== */
.form-section {
    background: var(--ev-white);
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

    .form-section .section-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 2px solid var(--ev-gray-200);
    }

    .form-section .section-title {
        font-family: 'Playfair Display', serif;
        font-size: 20px;
        font-weight: 700;
        color: var(--ev-dark);
        display: inline;
        vertical-align: middle;
        margin: 0;
    }

    .form-section .section-subtitle {
        display: block;
        font-size: 13px;
        color: var(--ev-gray-600);
        margin-top: 8px;
    }

/* ===== SECTION NUMBER CIRCLE ===== */
.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ev-primary), var(--ev-primary-dark));
    color: var(--ev-white);
    font-weight: 700;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ===== FORM LABEL ===== */
.form-section .form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ev-dark);
    margin-bottom: 6px;
}

/* ===== FORM GRID ===== */
.ncf-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

    .ncf-form-grid .form-group {
        margin-bottom: 0;
    }

/* ===== ENTRY LIST (phones / emails / addresses) ===== */
.ncf-entry-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== ITEM CARDS — gray rounded boxes ===== */
.ncf-item-card {
    background: var(--ev-gray-100);
    border-radius: 16px;
    padding: 24px;
    position: relative;
}

/* ===== DELETE BUTTON ===== */
.ncf-delete-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    line-height: 1;
    transition: background 0.2s;
}

    .ncf-delete-btn:hover {
        background: #FFEBEE;
    }

/* ===== CHECKBOX GROUP ===== */
.ncf-checkbox-group {
    display: flex;
    align-items: center;
    padding-top: 24px;
}

.ncf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--ev-dark);
    margin: 0;
}

    .ncf-checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
        accent-color: var(--ev-primary);
    }

/* ===== COMMENT CARD ===== */
.ncf-comment-card {
    padding: 16px 20px;
}

.ncf-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.ncf-comment-author {
    font-weight: 700;
    font-size: 14px;
    color: var(--ev-primary);
}

.ncf-comment-date {
    font-size: 12px;
    color: var(--ev-gray-600);
}

.ncf-comment-body {
    font-size: 14px;
    color: var(--ev-gray-700);
    line-height: 1.6;
}

/* ===== REQUIRED INDICATOR ===== */
.required {
    color: var(--ev-error);
}

/* ===== ERROR MESSAGE ===== */
.ncf-error-message {
    background: #FFEBEE;
    color: #C62828;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0;
}

/* ===== SUBMIT SECTION ===== */
.submit-section {
    background: var(--ev-white);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-bottom: 20px;
}

    .submit-section h3 {
        font-family: 'Playfair Display', serif;
        font-size: 20px;
        font-weight: 700;
        color: var(--ev-dark);
        margin-bottom: 8px;
    }

    .submit-section p {
        color: var(--ev-gray-600);
        font-size: 14px;
        margin-bottom: 20px;
    }

.submit-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE — NEW CUSTOMER ===== */
@media (max-width: 768px) {
    .form-section {
        padding: 20px;
    }

    .ncf-form-grid {
        grid-template-columns: 1fr;
    }

    .ncf-checkbox-group {
        padding-top: 0;
    }

    .submit-actions {
        flex-direction: column-reverse;
        align-items: center;
    }
}