/**
 * ClaimPress Frontend Styles
 * Modern UI for Warranty Options, Claim Forms, and Customer Dashboard.
 */

:root {
    --cp-fe-primary: #8b5cf6;
    /* Violet-500 from the image */
    --cp-fe-primary-hover: #7c3aed;
    --cp-fe-primary-light: #f5f3ff;
    --cp-fe-border: #e5e7eb;
    --cp-fe-input-bg: #f3f4f6;
    /* Light gray background for inputs */
    --cp-fe-text-main: #1f2937;
    --cp-fe-text-muted: #6b7280;
    --cp-fe-shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* =========================================
   Universal Form Container
   ========================================= */
.claimpress-claim-form,
.claimpress-guest-lookup-form {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.01);
    max-width: 550px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header Section */
.claimpress-form-header {
    text-align: center;
    margin-bottom: 35px;
}

.claimpress-form-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.claimpress-form-header p {
    color: var(--cp-fe-text-muted);
    font-size: 14px;
    margin: 0;
}

/* Form Groups */
.claimpress-form-group {
    margin-bottom: 24px;
}

.claimpress-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

/* Modern Inputs (Matching the Image) */
.claimpress-form-group input[type="text"],
.claimpress-form-group input[type="email"],
.claimpress-form-group input[type="number"],
.claimpress-form-group textarea,
.claimpress-form-group select,
.claimpress-claim-form .form-row .input-text,
/* Woo Compatibility */
.claimpress-guest-lookup-form .form-row .input-text {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--cp-fe-input-bg) !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: #111827 !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
    height: auto !important;
}

.claimpress-form-group input::placeholder {
    color: #9ca3af;
}

.claimpress-form-group input:focus,
.claimpress-form-group textarea:focus {
    background-color: #fff !important;
    border-color: var(--cp-fe-primary) !important;
    outline: none;
    box-shadow: 0 0 0 4px var(--cp-fe-primary-light);
}

/* =========================================
   Claim Type Toggle Pill (New Feature)
   ========================================= */
.claimpress-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.claimpress-type-option {
    flex: 1;
    position: relative;
}

.claimpress-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.claimpress-type-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 10px;
    background: var(--cp-fe-input-bg);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--cp-fe-text-muted);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.claimpress-type-option label:hover {
    background: #e5e7eb;
}

.claimpress-type-option input[type="radio"]:checked+label {
    background: var(--cp-fe-primary-light);
    border-color: var(--cp-fe-primary);
    color: var(--cp-fe-primary);
    font-weight: 600;
}

/* =========================================
   Primary Action Button
   ========================================= */
.claimpress-submit-btn,
button.claimpress-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    background-color: var(--cp-fe-primary);
    color: #fff;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.25);
}

.claimpress-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px -1px rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, #9061f9 0%, #7c3aed 100%);
}

.claimpress-submit-btn:active {
    transform: translateY(0);
}

/* =========================================
   Legacy / Other Element Support
   ========================================= */
/* Warranty Options Card (Product Page) */
.claimpress-warranty-options {
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid var(--cp-fe-border);
    border-radius: 12px;
    padding: 20px;
    clear: both !important;
    width: 100% !important;
    display: block !important;
}

.claimpress-warranty-choices label {
    padding: 12px 16px;
    border: 1px solid var(--cp-fe-border);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.claimpress-warranty-choices label:hover {
    border-color: var(--cp-fe-primary);
}

.claimpress-warranty-choices label:has(input:checked) {
    border-color: var(--cp-fe-primary);
    background-color: var(--cp-fe-primary-light);
}

.claimpress-warranty-choices input[type="radio"] {
    accent-color: var(--cp-fe-primary);
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 600px) {

    .claimpress-claim-form,
    .claimpress-guest-lookup-form {
        padding: 24px;
        margin: 20px 10px;
    }
}