/* =============================================================
   Checkout Architect Pro — Frontend Checkout Styles
   ============================================================= */

/* Customer type switcher wrapper */
.ca-type-switcher {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

/* The label/heading above the buttons */
.ca-type-switcher > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

/* Row of type buttons */
.ca-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Individual type button */
.ca-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
    outline: none;
}

.ca-type-btn:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, .05);
    color: #6366f1;
}

.ca-type-btn.is-active,
.ca-type-btn.active {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(124,58,237,.08));
    color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

/* Custom price field */
.ca-custom-price-wrap {
    position: relative;
}

.ca-custom-price-wrap::before {
    content: attr(data-symbol);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
}

.ca-custom-price-wrap input {
    padding-left: 24px;
}

/* Field visibility */
.ca-field-hidden {
    display: none !important;
}

/* Section wrappers */
.ca-section {
    margin: 20px 0;
}

.ca-section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* Field description */
.ca-field-description {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Full-width field */
.ca-field-full {
    width: 100%;
}

/* File upload */
.ca-file-upload-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ca-file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ca-file-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease;
}

.ca-file-upload-btn:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, .05);
}

.ca-file-upload-name {
    font-size: 13px;
    color: #64748b;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Repeater field */
.ca-repeater-wrap {
    margin-bottom: 20px;
}

.ca-repeater-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.ca-repeater-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ca-repeater-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    position: relative;
}

.ca-repeater-subfield {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.ca-repeater-subfield label {
    font-size: 13px;
    font-weight: 500;
}

.ca-repeater-remove {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #dc2626;
    line-height: 1;
    padding: 0;
}

.ca-repeater-add {
    margin-top: 8px;
    background: none;
    border: 1px dashed #9ca3af;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    color: var(--ca-primary, #6d28d9);
    font-size: 13px;
    font-weight: 500;
}

.ca-repeater-add:hover {
    border-color: var(--ca-primary, #6d28d9);
    background: rgba(109, 40, 217, 0.05);
}
