/* Import modern font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide WordPress elements when form is active */
body.cof-form-active {
    overflow: hidden !important;
}

body.cof-form-active #wpadminbar,
body.cof-form-active .site-header,
body.cof-form-active .site-footer,
body.cof-form-active .site-main>*:not(.cof-container) {
    display: none !important;
}

.cof-container {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: rgba(44, 62, 80, 0.95) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100vw !important;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    padding-top: 100px;
    padding-bottom: 100vh; /* Extra padding to extend background during scroll */
}

.cof-container.cof-modal-open {
    display: flex !important;
}

.cof-header {
    display: none;
}

.cof-header h2 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.cof-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
    width: 100%;
    max-width: 450px;
    height: auto;
    min-height: auto;
    position: relative;
    margin: 0;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.cof-container.cof-modal-open .cof-form-wrapper {
    transform: scale(1);
    opacity: 1;
}

/* Desktop styles (769px and up) */
@media (min-width: 768px) {
    .cof-container {
        padding-top: 100px;
        padding-left: 2rem;
        padding-right: 2rem;
        padding-bottom: 2rem;
    }

    .cof-form-wrapper {
        max-width: 600px;
        width: 100%;
        margin: 0 auto;
    }

    .cof-progress-bar {
        margin: 60px 2rem 1rem 2rem;
    }

    .cof-step-content {
        padding: 2rem;
    }

    .cof-form-row {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .cof-option-content {
        display: grid;
        grid-template-columns: 140px 120px 140px;
        align-items: center;
        gap: 1rem;
    }
}

/* Large desktop (1200px and up) */
@media (min-width: 1200px) {
    .cof-form-wrapper {
        max-width: 600px;
    }

    .cof-step-content {
        padding: 2.5rem;
    }
}

/* Progress bar */
.cof-progress-bar {
    height: 3px;
    background: #e9ecef;
    position: relative;
    margin: 60px 2rem 1rem 2rem;
}

.cof-progress-fill {
    height: 100%;
    background: #4a90e2;
    width: 20%;
    transition: width 0.6s ease-in-out;
}

.cof-progress-fill[data-step="2"] {
    width: 40%;
}

.cof-progress-fill[data-step="3"] {
    width: 60%;
}

.cof-progress-fill[data-step="4"] {
    width: 80%;
}

.cof-progress-fill[data-step="5"] {
    width: 100%;
}

.cof-progress-fill {
    height: 100%;
    background: #007bff;
    width: 20%;
    transition: width 0.6s ease-in-out;
    border-radius: 0 2px 2px 0;
}

.cof-progress-fill[data-step="2"] {
    width: 40%;
}

.cof-progress-fill[data-step="3"] {
    width: 60%;
}

.cof-progress-fill[data-step="4"] {
    width: 80%;
}

.cof-progress-fill[data-step="5"] {
    width: 100%;
}

/* Step styles */
.cof-step {
    display: none;
    position: relative;
}

.cof-step-content {
    padding: 1rem 2rem 2rem 2rem;
}

.cof-step.active {
    display: block !important;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cof-step-header {
    background: #ffffff;
    color: #2c3e50;
    padding: 2rem 2rem 0.5rem 2rem;
    margin: 0;
    position: relative;
    text-align: center;
    border-radius: 12px;
}

.cof-step-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.cof-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-align: center;
}

.cof-form-wrapper .cof-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #d14836;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease-in-out;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cof-form-wrapper .cof-close-btn:hover {
    color: #b73e2e;
    transform: scale(1.1);
}

/* Radio button styles */
.cof-radio-group {
    margin-bottom: 2rem;
}

.cof-radio-option {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    min-height: 60px;
}

.cof-radio-option:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
    transform: none;
}

.cof-radio-option input[type="radio"] {
    display: none;
}

.cof-radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease-in-out;
    flex-shrink: 0;
    align-self: center;
}

.cof-radio-option input[type="radio"]:checked+.cof-radio-custom {
    border-color: #4a90e2;
    background: #4a90e2;
}

.cof-radio-option input[type="radio"]:checked+.cof-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Demolition form: radio button on the left (no .cof-option-main-row wrapper) */
.cof-demolition-order-form .cof-radio-option {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

/* First row with radio button and content */
.cof-option-main-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-height: 50px;
}

.cof-option-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    box-sizing: border-box;
    overflow: hidden;
}

.cof-container-image {
    width: 100px;
    height: 74px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    pointer-events: none;
    user-select: none;
    margin-left: auto;
}

.cof-option-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    text-align: left;
    flex-shrink: 0;
}

.cof-info-link {
    color: #4a90e2;
    text-decoration: underline;
    font-size: 0.85rem;
    transition: color 0.3s ease-in-out;
    flex-shrink: 0;
    text-align: left;
}

.cof-info-link:hover {
    color: #357abd;
}

.cof-price {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    text-align: left;
    flex-shrink: 0;
    min-width: 120px;
}

/* Form inputs */
.cof-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cof-form-group {
    margin-bottom: 1.5rem;
}

.cof-form-group label {


    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.cof-form-group input,
.cof-form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease-in-out;
    background: #ffffff;
    background-image: none;
}

.cof-form-group select {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease-in-out;
    background: #ffffff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.cof-form-group input:focus,
.cof-form-group textarea:focus,
.cof-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

/* Flatpickr Date picker - Calendar icon */
.cof-form-group input[readonly] {
    background-color: #ffffff;
    cursor: pointer;
}

#delivery_date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 18px;
    padding-right: 2.75rem;
}

.cof-form-group input[readonly]:hover {
    border-color: #d14836;
}

.cof-form-group input[readonly]:focus {
    border-color: #d14836;
    box-shadow: 0 0 0 3px rgba(209, 72, 54, 0.1);
}

/* Flatpickr calendar - Simple clean design */
.flatpickr-calendar {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
    margin-top: 8px !important;
    overflow: hidden !important;
}

.flatpickr-calendar.open {
    z-index: 99999 !important;
}

/* Month header - clean white design */
.flatpickr-months {
    background: #ffffff !important;
    border-bottom: 1px solid #e9ecef !important;
    padding: 1rem !important;
    border-radius: 8px 8px 0 0 !important;
}

.flatpickr-innerContainer {
    border-radius: 0 0 8px 8px !important;
    overflow: hidden !important;
}

.flatpickr-current-month {
    font-size: 1rem !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 600 !important;
    color: #2c3e50 !important;
    background: transparent !important;
}

.flatpickr-current-month .numInputWrapper {
    color: #2c3e50 !important;
}

.flatpickr-current-month input.cur-year {
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    fill: #2c3e50 !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: #f8f9fa !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #2c3e50 !important;
}

/* Weekdays - simple clean */
.flatpickr-weekdays {
    background: #ffffff !important;
    padding: 0.5rem 0 !important;
}

.flatpickr-weekday {
    color: #6c757d !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
}

/* Days - clean simple design */
.flatpickr-days {
    background: #ffffff !important;
}

.flatpickr-day {
    color: #2c3e50 !important;
    border: none !important;
    border-radius: 4px !important;
    margin: 1px !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #d14836 !important;
    color: white !important;
    border: none !important;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #b73e2e !important;
    color: white !important;
}

.flatpickr-day:hover:not(.selected):not(.disabled) {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    border: none !important;
}

.flatpickr-day.today {
    background: #fff3f0 !important;
    color: #d14836 !important;
    font-weight: 600 !important;
}

.flatpickr-day.today:hover {
    background: #ffe5de !important;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #dee2e6 !important;
}

/* Custom time picker with select boxes */
.cof-time-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cof-time-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.cof-time-prefix {
    position: absolute;
    left: 1rem;
    color: #cccccc;
    font-size: 1rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

.cof-time-select {
    flex: 1;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    color: #2c3e50;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: center;
    padding-left: 2rem;
    padding-right: 2.5rem;
}

#delivery_hours,
#delivery_minutes {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

.cof-time-select:hover {
    border-color: #d14836;
}

.cof-time-select:focus {
    outline: none;
    border-color: #d14836;
    box-shadow: 0 0 0 3px rgba(209, 72, 54, 0.1);
    transform: translateY(-1px);
}

.cof-time-separator {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6c757d;
    padding: 0 0.25rem;
    flex-shrink: 0;
}

.cof-form-group input::placeholder,
.cof-form-group textarea::placeholder {
    color: #cccccc;
    opacity: 1;
}

.cof-form-group textarea {
    resize: vertical;
    min-height: 100px;
}


/* Duration buttons */
.cof-duration-section {
    margin-bottom: 2rem;
    text-align: center;
}

.cof-duration-section h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}

.cof-duration-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cof-duration-btn {
    padding: 0.75rem 1.25rem;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
}

.cof-duration-btn:hover {
    border-color: #d0d7de;
    color: #495057;
    transform: none;
    box-shadow: none;
}

.cof-duration-btn.active {
    background: #1f2937 !important;
    border-color: #1f2937 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.cof-check-icon {
    font-weight: bold;
    font-size: 0.9rem;
}

/* Selection tags (pro step 3 summary) */
.cof-selection-tag {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.cof-selection-tag:hover {
    border-color: #9ca3af;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cof-selection-tag:empty {
    display: none;
}

/* Checkbox */
.cof-checkbox-option {
    display: inline-flex !important;
    align-items: flex-start !important;
    cursor: pointer !important;
    gap: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    background: rgba(74, 144, 226, 0.05);
    width: 100%;

}

.cof-checkbox-option input[type="checkbox"] {
    display: none;
}

.cof-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: inline-block;
    margin-top: 2px;
}

.cof-checkbox-label {
    flex: 1;
    display: block;
}

.cof-checkbox-option input[type="checkbox"]:checked+.cof-checkbox-custom {
    border-color: #4a90e2;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.cof-checkbox-option input[type="checkbox"]:checked+.cof-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    animation: checkmark 0.2s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Accordion styles */
.cof-accordion-content {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0.5rem 0 0 calc(16px + 1rem);
}

.cof-accordion-items {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.cof-container .cof-accordion-items {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

.cof-item {
    color: #666 !important;
    font-size: 0.8rem !important;
    background: #f8f9fa !important;
    padding: 0.3rem 0.8rem !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    flex-shrink: 1 !important;
    display: inline-flex !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cof-container .cof-item {
    display: inline-flex !important;
    float: none !important;
}

/* FORCE HORIZONTAL LAYOUT - MUST BE IN ROW NOT COLUMN! */
.cof-accordion-items,
.cof-container .cof-accordion-items,
div.cof-container .cof-accordion-items,
.cof-form-wrapper .cof-accordion-items,
body .cof-container .cof-accordion-items {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 0.5rem !important;
}

/* Force individual items to be inline */
.cof-item,
.cof-container .cof-item,
div.cof-container .cof-item,
.cof-form-wrapper .cof-item,
body .cof-container .cof-item,
.cof-container .cof-accordion-items .cof-item,
div.cof-container .cof-accordion-items .cof-item,
.cof-form-wrapper .cof-accordion-items .cof-item {
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
    flex-basis: auto !important;
    float: none !important;
    clear: none !important;
    vertical-align: top !important;
    position: static !important;
}

/* Override any theme or WordPress styles that might force block display */
.cof-accordion-items span,
.cof-accordion-items span.cof-item {
    display: inline-block !important;
    width: auto !important;
}

/* Alternative CSS Grid approach as backup */
.cof-accordion-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(auto, max-content)) !important;
    grid-gap: 0.5rem !important;
    align-items: start !important;
    width: 100% !important;
}

/* Fallback using text layout */
.cof-accordion-items {
    text-align: left !important;
    line-height: 2 !important;
}

.cof-accordion-items .cof-item {
    margin-right: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.cof-info-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    position: relative;
}

.cof-info-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.cof-info-link.cof-active {
    color: #d14836;
    font-weight: 600;
}

.cof-info-link.cof-active::after {
    content: " ↑";
    font-weight: normal;
}

.cof-info-link::after {
    content: " ↓";
    transition: transform 0.3s ease;
    font-weight: normal;
}

/* Buttons */
.cof-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-family: inherit;
    text-decoration: none;
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.cof-btn-primary {
    background: #B54525;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(181, 69, 37, 0.3);
    width: 100%;
    margin-bottom: 1rem;
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.875rem 2rem;
}

.cof-btn-primary:hover {
    background: #9a3a20;
    transform: none;
    box-shadow: 0 3px 8px rgba(181, 69, 37, 0.4);
}

.cof-btn-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #d0d0d0;
    margin-top: 0.5rem;
    box-shadow: none;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.875rem 2rem;
    width: 100%;
    min-width: auto;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 6px;
}

.cof-btn-secondary:hover {
    color: #555;
    background: #f5f5f5;
    border-color: #c0c0c0;
    transform: none;
    box-shadow: none;
}

.cof-btn-link {
    background: transparent;
    color: #007bff;
    border: none;
    margin-top: 0.5rem;
    box-shadow: none;
    text-decoration: underline;
    font-size: 0.9rem;
    padding: 0.5rem;
    width: auto;
    min-width: auto;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.cof-btn-link:hover {
    color: #0056b3;
    transform: none;
    box-shadow: none;
}

.cof-btn-gray {
    background: transparent;
    color: #666666;
    border: 1px solid #d0d0d0;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.875rem 2rem;
    transition: all 0.2s ease;
}

.cof-btn-gray:hover {
    background: #f5f5f5;
    border-color: #c0c0c0;
    color: #555555;
    transform: none;
}

/* Success page - hide progress bar and show only blue divider */
.cof-step[data-step="6"] .cof-progress-bar {
    display: none;
}

.cof-success-divider {
    height: 3px;
    background: #4a90e2;
    margin: 60px 2rem 1.5rem 2rem;
    border-radius: 2px;
}

.cof-step[data-step="6"] .cof-step-header {
    padding: 0 2rem 0.5rem 2rem;
}

.cof-step[data-step="6"] .cof-step-header h2 {
    margin-bottom: 0.75rem;
}

.cof-step[data-step="6"] .cof-step-header .cof-subtitle {
    margin-bottom: 0;
}

.cof-step[data-step="6"] .cof-step-content {
    padding: 1.5rem 2rem 2rem 2rem;
}

/* Success message */
.cof-success-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cof-success-container p {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.cof-success-container p:last-of-type {
    margin-bottom: 2rem;
}

.cof-success-header {
    margin-bottom: 2.5rem;
}

.cof-success-subtitle {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin: 0;
}

.cof-success-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.cof-success-column {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.cof-success-column h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
}

.cof-success-column p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

.cof-success-icon {
    font-size: 4rem;
    color: #46b450;
    margin-bottom: 1rem;
    font-weight: bold;
}

.cof-success-message h4 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cof-success-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.cof-success-message p {
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.6;
}

.cof-contact-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #46b450;
}

.cof-contact-item {
    margin-bottom: 0.75rem;
    color: #2c3e50;
    font-size: 0.95rem;
}

.cof-contact-item:last-child {
    margin-bottom: 0;
}

.cof-contact-item strong {
    color: #d14836;
    margin-right: 0.5rem;
}

.cof-contact-label {
    color: #d14836;
    font-weight: 600;
    margin-right: 0.5rem;
}

.cof-success-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.cof-step-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-align: center;
}

/* Tablet and Mobile (everything below desktop) */
@media (max-width: 767px) {
    .cof-container {
        padding: 0.5rem;
        padding-top: 50px;
        align-items: flex-start !important;
        justify-content: center !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior: contain !important;
    }

    .cof-form-wrapper {
        max-width: 95vw;
        max-height: none !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        padding-bottom: 1rem !important;
    }

    /* Mobile accordion adjustments */
    .cof-accordion-content {
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    .cof-accordion-items {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .cof-radio-option {
        height: auto !important;
        min-height: auto !important;
        padding-bottom: 0.75rem !important;
        overflow: visible !important;
    }

    .cof-step {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
    }

    .cof-step-content {
        height: auto !important;
        overflow: visible !important;
        padding: 1rem !important;
    }

    .cof-option-content {
        grid-template-columns: 1fr auto auto !important;
    }

    /* Fix close button position on mobile */
    .cof-form-wrapper .cof-close-btn {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 1000 !important;
        background: none !important;
        font-size: 1.8rem !important;
    }

    .cof-progress-bar {
        margin: 50px 1rem 1rem 1rem !important;
        position: relative !important;
    }

    .cof-step-header {
        padding: 1rem 1.5rem;
    }

    .cof-step-header h3 {
        font-size: 1.1rem;
    }

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

    .cof-duration-buttons {
        flex-direction: column;
    }

    .cof-duration-btn {
        width: 100%;
        justify-content: center;
    }

    .cof-success-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cof-success-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cof-btn {
        width: 100%;
    }

    .cof-progress-bar {
        margin: 60px 2rem 1rem 2rem;
    }

    /* Mobile radio button layout - vertical */
    .cof-option-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        width: 100%;
    }

    .cof-container-image {
        width: 60px;
        height: 50px;
    }

    .cof-option-title {
        justify-self: start;
        align-self: flex-start;
        font-size: 1rem;
    }

    .cof-info-link {
        justify-self: start;
        align-self: flex-start;
        font-size: 0.85rem;
    }

    .cof-price {
        align-self: flex-start;
        font-weight: 700;
        font-size: 1rem;
        text-align: left;
    }
}

/* =====================================
   PRICE TABLE SHORTCODE STYLES
   ===================================== */

.cof-price-table-wrapper {
    max-width: 100%;
    margin: 0;
}

/* Container size tabs */
.cof-price-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cof-price-tab {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 6px;
    background-color: #e8e8e8;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cof-price-tab:hover {
    background-color: #d0d0d0;
}

.cof-price-tab.active {
    background-color: #1a2332;
    color: #ffffff;
}

.cof-price-tab .cof-check-icon {
    font-size: 0.9rem;
    font-weight: bold;
}

/* Materials price list */
.cof-price-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cof-material-variants {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cof-price-item {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    transition: all 0.2s ease;
}

.cof-price-item:hover {
    border-color: #d0d0d0;
}

.cof-price-row {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr;
    align-items: center;
    gap: 2rem;
}

.cof-material-name {
    font-size: 1.15rem;
    font-weight: 400;
    color: #1a1a1a;
    white-space: nowrap;
}

.cof-price-info-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    cursor: pointer;
    text-align: center;
    justify-self: center;
    position: relative;
}

.cof-price-info-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.cof-price-info-link.cof-active {
    color: #d14836;
    font-weight: 600;
}

.cof-price-info-link.cof-active::after {
    content: " ↑";
    font-weight: normal;
}

.cof-price-info-link::after {
    content: " ↓";
    transition: transform 0.3s ease;
    font-weight: normal;
}

.cof-material-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: left;
    justify-self: start;
}

/* Price accordion */
.cof-price-accordion {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.cof-price-accordion .cof-accordion-items {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

.cof-price-accordion .cof-item {
    color: #666 !important;
    font-size: 0.8rem !important;
    background: #f8f9fa !important;
    padding: 0.3rem 0.8rem !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    margin: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cof-price-tabs {
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cof-price-tab {
        flex-shrink: 0;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .cof-price-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }

    .cof-material-name {
        font-size: 1.05rem;
        white-space: nowrap;
    }

    .cof-price-info-link {
        text-align: left;
        justify-self: start;
        font-size: 0.85rem;
    }

    .cof-material-price {
        text-align: left;
        justify-self: start;
        font-size: 1.05rem;
        font-weight: 700;
    }

    .cof-price-item {
        padding: 1.25rem 1.5rem;
    }
}

/* =====================================
   FIELD VALIDATION STYLES
   ===================================== */

.required {
    color: #D63638;
    font-weight: 600;
}

.cof-field-error {
    color: #D63638;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0;
    font-weight: 500;
    display: none;
}

.cof-field-error:not(:empty) {
    display: block;
}

.cof-form-group input.error,
.cof-form-group textarea.error,
.cof-form-group select.error {
    border-color: #D63638 !important;
    background-color: #fff5f5;
}

.cof-form-group input.error:focus,
.cof-form-group textarea.error:focus,
.cof-form-group select.error:focus {
    border-color: #D63638 !important;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.1) !important;
}

/* Phone number input with +420 prefix */
.cof-phone-wrapper {
    display: flex;
    align-items: stretch;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    background: #ffffff;
}

.cof-phone-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.cof-phone-wrapper.error-wrapper {
    border-color: #D63638 !important;
    background-color: #fff5f5;
}

.cof-phone-wrapper.error-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.1) !important;
}

.cof-phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #f3f4f6;
    border-right: 2px solid #e9ecef;
    color: #6b7280;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}

.cof-phone-wrapper input[type="tel"] {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    transition: none;
}

.cof-phone-wrapper input[type="tel"]:focus {
    outline: none;
    border: none !important;
    box-shadow: none !important;
    transform: none;
}

.cof-phone-wrapper input[type="tel"].error {
    border: none !important;
    background-color: transparent !important;
}

/* Machine selection cards */
.cof-machine-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cof-machine-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.cof-machine-card input[type="radio"] {
    display: none;
}

.cof-machine-card-inner {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cof-machine-card:hover .cof-machine-card-inner {
    border-color: #C0392B;
    box-shadow: 0 2px 8px rgba(192,57,43,0.12);
}

.cof-machine-card input[type="radio"]:checked ~ .cof-machine-card-inner {
    border-color: #C0392B;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
}

.cof-machine-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
    overflow: hidden;
}

.cof-machine-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cof-machine-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.cof-machine-name {
    display: block;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    padding: 0.6rem 0.5rem;
}

.cof-machine-check {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #C0392B;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.cof-machine-card input[type="radio"]:checked ~ .cof-machine-check {
    display: flex;
}

.cof-machine-check::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* File upload drop area */
.cof-file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}

.cof-file-upload-area:hover,
.cof-file-upload-area.cof-drag-over {
    border-color: #C0392B;
    background: #fff5f4;
}

.cof-file-upload-area .cof-file-upload-icon {
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.cof-file-upload-area .cof-file-upload-label {
    display: inline-block;
    color: #C0392B;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 0.25rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cof-file-upload-area .cof-help-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.2rem 0 0;
    line-height: 1.4;
}

.cof-files-list {
    margin-top: 0.75rem;
}

.cof-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    color: #374151;
}

.cof-file-size {
    color: #9ca3af;
    margin-left: 0.5rem;
    white-space: nowrap;
}