/* Damans After-Sales — Frontend Styles */

/* ── Form Wrapper ── */
.das-form-wrapper,
.das-portal-wrapper {
    max-width: 760px;
    margin: 0 auto;
    font-family: inherit;
}
.das-form-title,
.das-portal-title {
    margin-bottom: 8px;
}
.das-form-intro,
.das-portal-intro {
    color: #666;
    margin-bottom: 24px;
}

/* ── Form Sections ── */
.das-form-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}
.das-form-section h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
}

/* ── Fields ── */
.das-field {
    margin-bottom: 16px;
}
.das-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #444;
}
.das-field input[type="text"],
.das-field input[type="email"],
.das-field input[type="tel"],
.das-field input[type="date"],
.das-field select,
.das-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
    color: #333;
    background: #fff;
}
.das-field input:focus,
.das-field select:focus,
.das-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
}
.das-field textarea {
    resize: vertical;
    min-height: 120px;
}
.das-required {
    color: #dc3545;
}
.das-field-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

/* ── Two-col layout ── */
.das-field-row.das-two-col {
    display: flex;
    gap: 16px;
}
.das-field-row.das-two-col .das-field {
    flex: 1;
}
@media (max-width: 600px) {
    .das-field-row.das-two-col {
        flex-direction: column;
        gap: 0;
    }
}

/* ── File Upload ── */
.das-file-input {
    width: 100%;
    padding: 8px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    font-size: 13px;
}
.das-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.das-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}
.das-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.das-preview-item .das-preview-video {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 28px;
    color: #666;
}
.das-preview-item .das-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    padding: 0;
}

/* ── Submit Button ── */
.das-form-submit-section {
    text-align: center;
}
.das-submit-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: inline-block;
}
.das-submit-btn:hover {
    background: #005f8b;
}
.das-submit-btn:active {
    transform: scale(0.98);
}
.das-submit-btn.das-btn-secondary {
    background: #555;
}
.das-submit-btn.das-btn-secondary:hover {
    background: #333;
}
.das-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}
.das-privacy-note {
    font-size: 12px;
    color: #999;
    margin-top: 12px;
}

/* ── Messages ── */
#das-form-messages .das-alert,
.das-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.das-alert-error {
    background: #ffeaea;
    border: 1px solid #f5c6c6;
    color: #a00;
}
.das-alert-success {
    background: #eafff0;
    border: 1px solid #b8e8c8;
    color: #1a6b38;
}

/* ── Success Box ── */
.das-success-box {
    background: #eafff0;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
}
.das-success-icon {
    display: inline-block;
    width: 56px;
    height: 56px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    line-height: 56px;
    margin-bottom: 16px;
}
.das-success-box h3 {
    margin: 0 0 12px;
    color: #1a6b38;
}
.das-portal-link {
    display: inline-block;
    margin-top: 8px;
    color: #0073aa;
    font-weight: 600;
    text-decoration: none;
}
.das-portal-link:hover {
    text-decoration: underline;
}

/* ── Portal ── */
.das-lookup-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    max-width: 480px;
    margin: 0 auto 20px;
}
.das-lookup-box h3 {
    margin: 0 0 8px;
}
.das-lookup-form .das-field {
    margin-bottom: 14px;
}
.das-login-prompt {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 16px;
}

/* ── Ticket Cards ── */
.das-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.das-ticket-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.das-ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
}
.das-ticket-ref {
    font-weight: 700;
    font-size: 15px;
    color: #0073aa;
    margin-right: 10px;
}
.das-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.das-ticket-date {
    font-size: 12px;
    color: #888;
}
.das-ticket-card-body {
    padding: 16px;
}
.das-ticket-detail-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}
.das-ticket-detail-label {
    font-weight: 600;
    color: #555;
    min-width: 100px;
    flex-shrink: 0;
}
.das-ticket-updates {
    margin-top: 16px;
    border-top: 1px solid #eee;
    padding-top: 12px;
}
.das-ticket-updates h4 {
    margin: 0 0 10px;
    font-size: 13px;
    color: #0073aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.das-customer-note {
    background: #f0f7ff;
    border-left: 3px solid #0073aa;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 8px;
}
.das-customer-note-date {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}
.das-customer-note p {
    margin: 0;
    font-size: 13px;
    color: #333;
}
.das-portal-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ── Warranty Status ───────────────────────────────────────── */
.das-warranty-status-box {
    margin-top: 4px;
}

.das-warranty-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.das-warranty-unknown {
    background: #f0f2f5;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.das-warranty-in {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.das-warranty-out {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.das-ow-notice {
    margin-top: 12px;
    background: #fff8e6;
    border: 1px solid #ffc107;
    border-left: 4px solid #fd7e14;
    border-radius: 6px;
    padding: 14px 16px;
}

.das-ow-charge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.das-ow-charge-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.das-ow-charge-amount {
    font-size: 22px;
    font-weight: 700;
    color: #c0392b;
}

.das-ow-charge-note {
    font-size: 13px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* ── Call-Out Checkbox ─────────────────────────────────────── */
.das-callout-field {
    background: #f0f4f8;
    border: 1px solid #d0dce8;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 8px;
}

.das-callout-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #1a2332;
}

.das-callout-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #1a3a5c;
    cursor: pointer;
}

.das-field-hint-inline {
    font-size: 12px;
    color: #888;
    font-weight: normal;
    margin-left: 4px;
}

/* Update warranty-out to amber (advisory, not definitive red) */
.das-warranty-out {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.das-ow-notice {
    margin-top: 10px;
    background: #fff8e6;
    border: 1px solid #ffc107;
    border-left: 4px solid #fd7e14;
    border-radius: 6px;
    padding: 14px 16px;
}

.das-ow-may-apply {
    font-size: 14px;
    font-weight: 600;
    color: #856404;
    margin: 0 0 8px 0;
}

/* ── Postcode Lookup ───────────────────────────────────────── */
.das-postcode-lookup-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
}

.das-postcode-input {
    flex: 0 0 180px;
    padding: 10px 14px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.das-postcode-input:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}

.das-postcode-btn {
    padding: 10px 18px;
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

.das-postcode-btn:hover { background: #14304f; }
.das-postcode-btn:disabled { opacity: .6; cursor: not-allowed; }

.das-postcode-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
}

.das-postcode-status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.das-postcode-status-error {
    background: #fff0f0;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.das-address-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.das-address-fields input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.das-address-fields input:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}

.das-address-fields .das-field-row {
    display: flex;
    gap: 8px;
}

.das-address-fields .das-field-row input {
    flex: 1;
}

@media (max-width: 480px) {
    .das-postcode-lookup-row {
        flex-direction: column;
    }
    .das-postcode-input {
        flex: none;
        width: 100%;
    }
    .das-address-fields .das-field-row {
        flex-direction: column;
    }
}
