/**
 * Premium frontend stylesheet for WooCommerce Offerte & Legservice
 */

/* ==========================================================================
   1. Product Page Buttons
   ========================================================================== */
.offerte-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
}

.offerte-buttons-container a.secondary-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    cursor: pointer;
    min-height: 50px;
    flex: 1 1 200px;
    text-align: center;
}

/* Product page Action Buttons (Legservice & Offerte) */
.offerte-buttons-container a.offerte-btn-leggen,
.offerte-buttons-container a.offerte-btn-offerte {
    background-color: #ffffff !important;
    color: #0c4028 !important;
    border: 1px solid #0c4028 !important;
    box-shadow: 0 2px 4px rgba(12, 64, 40, 0.05);
}

.offerte-buttons-container a.offerte-btn-leggen:hover,
.offerte-buttons-container a.offerte-btn-offerte:hover {
    background-color: #0c4028 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 12px rgba(12, 64, 40, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   2. Shortcode Request Form Page
   ========================================================================== */
.offerte-form-wrapper {
    max-width: 720px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #334155;
}

.offerte-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.offerte-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.offerte-card-header {
    background: #fafaf9;
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f1f1ef;
    position: relative;
    text-align: center;
}

.offerte-card-header h2 {
    margin: 8px 0 6px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1c1917 !important;
}

.header-subtitle {
    margin: 0;
    color: #78716c;
    font-size: 14px;
    line-height: 1.5;
}

.badge-type {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

.badge-type-leggen {
    background-color: #e6f4ea;
    color: #0c4028;
}

.badge-type-offerte {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Form Layout & Sections */
.offerte-main-form {
    padding: 32px;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1c1917 !important;
    margin: 0 0 20px 0 !important;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 10px;
}

.section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #1c1917;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 10px;
}

/* Grids and Rows */
.form-row {
    margin-bottom: 18px;
    width: 100%;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #44403c;
    margin-bottom: 6px;
}

.form-group label .required {
    color: #dc2626;
    margin-left: 2px;
}

/* Fields Styling */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"] {
    padding: 10px 14px;
    font-size: 14px;
    color: #1c1917;
    background-color: #ffffff;
    border: 1px solid #d6d3d1;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.form-group input:focus {
    border-color: #0c4028;
    box-shadow: 0 0 0 3px rgba(12, 64, 40, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input[readonly] {
    background-color: #f5f5f4;
    color: #78716c;
    cursor: not-allowed;
    border-color: #e7e5e4;
}

.form-help {
    font-size: 11px;
    color: #78716c;
    margin-top: 4px;
}

/* Radio Button Toggle Pills (Modern alternative) */
.radio-toggle-group {
    display: flex;
    border: 1px solid #d6d3d1;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fafaf9;
    height: 42px;
    box-sizing: border-box;
}

.radio-option {
    flex: 1;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-weight: 500;
    color: #57534e;
    transition: all 0.2s ease;
    user-select: none;
    text-align: center;
}

.radio-option input[type="radio"]:checked + .radio-label {
    background-color: #0c4028;
    color: #ffffff;
    font-weight: 600;
}

.radio-option:not(:last-child) {
    border-right: 1px solid #d6d3d1;
}

/* Submit Section */
.form-submit-row {
    margin-top: 32px;
    border-top: 1px solid #f1f1ef;
    padding-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.offerte-submit-btn {
    background-color: #0c4028;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.offerte-submit-btn:hover {
    background-color: #062316;
    box-shadow: 0 10px 15px -3px rgba(12, 64, 40, 0.2), 0 4px 6px -2px rgba(12, 64, 40, 0.1);
    transform: translateY(-1px);
}

.offerte-submit-btn:active {
    transform: translateY(0);
}

.btn-arrow {
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.offerte-submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Alerts styling */
.offerte-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.5;
}

.alert-icon {
    font-size: 18px;
    line-height: 1;
    margin-right: 12px;
    flex-shrink: 0;
}

.alert-content {
    flex-grow: 1;
}

.offerte-alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.offerte-alert-success .alert-icon {
    color: #15803d;
}

.offerte-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.offerte-alert-error .alert-icon {
    color: #b91c1c;
}

.error-list {
    margin: 0;
    padding-left: 20px;
}

.error-list li {
    margin-bottom: 4px;
}

.error-list li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   3. Responsive Media Queries
   ========================================================================== */
@media (max-width: 640px) {
    .offerte-buttons-container {
        flex-direction: column;
    }
    
    .offerte-buttons-container a.secondary-action-btn {
        width: 100%;
        flex: 1 1 auto;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .offerte-card-header,
    .offerte-main-form {
        padding: 20px;
    }
    
    .form-submit-row {
        justify-content: center;
    }
    
    .offerte-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Remove standard top border from add-to-cart form when floor calculator is active */
.wc-fc-calculator-card ~ form.cart,
form.cart:has(.wc-fc-calculator-card) {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}
