/* CCFM Form Styles */
* {
    box-sizing: border-box;
}

:root {
    --ccfm-primary: #a68b4d; /* Warm gold from screenshots */
    --ccfm-primary-hover: #8f773f;
    --ccfm-secondary: #fdfaf5;
    --ccfm-text: #333;
    --ccfm-text-muted: #666;
    --ccfm-border: #e0e0e0;
    --ccfm-bg: #fff;
    --ccfm-radius: 30px; /* Rounded buttons */
    --ccfm-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.ccfm-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--ccfm-bg);
    border-radius: 15px;
    box-shadow: var(--ccfm-shadow);
    font-family: 'Playfair Display', serif, system-ui; /* Serif for that premium feel */
}

.ccfm-header {
    text-align: center;
    margin-bottom: 40px;
}

.ccfm-header h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--ccfm-text);
}

.ccfm-divider {
    width: 100px;
    height: 2px;
    background: var(--ccfm-primary);
    margin: 20px auto;
}

/* Progress Bar */
.ccfm-progress-bar {
    width: 100%;
    height: 6px;
    background: #f0eee8;
    border-radius: 3px;
    margin-bottom: 40px;
    overflow: hidden;
}

.ccfm-progress {
    height: 100%;
    background: var(--ccfm-primary);
    width: 12.5%; /* 1/8 steps */
    transition: width 0.4s ease;
}

/* Steps */
.ccfm-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.ccfm-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ccfm-step h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Grids */
.ccfm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Cards (Radio/Checkbox) */
.ccfm-card {
    cursor: pointer;
    position: relative;
}

.ccfm-card input {
    position: absolute;
    opacity: 0;
}

.ccfm-card-content {
    background: #fff;
    border: none;
    border-radius: 60px; /* Oval shape */
    padding: 0; /* Let child elements handle padding */
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 80px;
    box-shadow: var(--ccfm-shadow);
}

.ccfm-card-img {
    background: #fff;
    width: 80px;
    height: 80px;
    border: 1px solid var(--ccfm-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.ccfm-card-img img {
    width: 60%;
    height: auto;
    object-fit: contain;
}

.ccfm-card-text {
    background: linear-gradient(90deg, #b89d5a 0%, #d8be7c 100%);
    color: #fff;
    flex-grow: 1;
    height: 60px;
    margin-left: -30px; /* Overlap with circle */
    padding-left: 45px;
    padding-right: 20px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 0 40px 40px 0;
    text-transform: uppercase;
}

/* Specific grids setup */
.ccfm-intervention-grid,
.ccfm-user-type-grid,
.ccfm-location-grid,
.ccfm-city-grid,
.ccfm-country-grid,
.ccfm-urgency-grid {
    grid-template-columns: repeat(2, 1fr);
}

.ccfm-card input:checked + .ccfm-card-content {
    transform: scale(1.03);
}

.ccfm-card input:checked + .ccfm-card-content .ccfm-card-text {
    background: linear-gradient(90deg, #a68b4d 0%, #c49a3d 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.ccfm-appointment-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.ccfm-appointment-container input {
    height: 70px;
    font-size: 1.1rem;
    padding: 0 25px;
    border: 2px solid #f0eee8;
    background: #fff;
    border-radius: 15px;
    color: var(--ccfm-text);
    transition: all 0.3s;
    cursor: pointer;
    font-family: inherit;
}

.ccfm-appointment-container input:focus {
    border-color: var(--ccfm-primary);
    box-shadow: 0 0 15px rgba(166, 139, 77, 0.1);
}

.ccfm-appointment-container .ccfm-input-group {
    position: relative;
    margin-bottom: 0;
}

/* Custom icons for modern feel */
.ccfm-appointment-container input[type="date"]::before {
    content: "📅  Select Date: ";
    color: #999;
    margin-right: 10px;
}

.ccfm-appointment-container input[type="time"]::before {
    content: "🕒  Select Time: ";
    color: #999;
    margin-right: 10px;
}
/* Custom Modern Alerts */
.ccfm-custom-alert {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #fff;
    border-left: 5px solid #ff4d4d;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 20px 40px;
    border-radius: 12px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    pointer-events: none;
}

.ccfm-custom-alert.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ccfm-alert-icon {
    font-size: 1.5rem;
}

.ccfm-alert-message {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ccfm-text);
}

/* Success style for alert */
.ccfm-custom-alert.success {
    border-left-color: #2ecc71;
}
.ccfm-input-group {
    margin-bottom: 20px;
}

.ccfm-input-group input, 
.ccfm-input-group textarea {
    width: 100%;
    height: 54px;
    padding: 12px 20px;
    border: 1px solid var(--ccfm-border);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.ccfm-input-group textarea {
    height: auto;
    min-height: 120px;
}

.ccfm-input-group input:focus, 
.ccfm-input-group textarea:focus {
    border-color: var(--ccfm-primary);
}

.ccfm-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* File Upload */
.ccfm-file-upload {
    position: relative;
    border: 1px solid var(--ccfm-border);
    border-radius: 10px;
    padding: 2px;
}

.ccfm-file-upload input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
}

.ccfm-file-label {
    display: block;
    padding: 15px 20px;
    cursor: pointer;
    background: #fff;
    color: var(--ccfm-primary);
    font-weight: 500;
}

.ccfm-file-list {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--ccfm-text-muted);
}

/* Checkbox Consent */
.ccfm-checkbox-group {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    font-size: 0.9rem;
    color: var(--ccfm-primary);
    font-weight: 500;
    line-height: 1.4;
}

.ccfm-checkbox-group input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--ccfm-primary);
}

/* Navigation Buttons */
.ccfm-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.ccfm-btn {
    padding: 15px 40px;
    border: none;
    border-radius: var(--ccfm-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: capitalize;
}

.ccfm-btn.primary {
    background: var(--ccfm-primary);
    color: #fff;
}

.ccfm-btn.primary:hover {
    background: var(--ccfm-primary-hover);
}

.ccfm-btn.secondary {
    background: #a68b4d99; /* Transparent gold */
    color: #fff;
}

/* Utilities */
.ccfm-hidden {
    display: none !important;
}

/* Phone Row */
.ccfm-phone-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.ccfm-country-select {
    flex: 0 0 130px;
}

.ccfm-phone-input {
    flex: 1;
}

.ccfm-country-select select {
    width: 100%;
    height: 54px;
    padding: 0 15px;
    border: 1px solid var(--ccfm-border);
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.ccfm-phone-input input {
    width: 100%;
    height: 54px;
    padding: 15px 20px;
    border: 1px solid var(--ccfm-border);
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.ccfm-country-select select:focus,
.ccfm-phone-input input:focus {
    border-color: var(--ccfm-primary);
    box-shadow: 0 0 0 4px rgba(166, 139, 77, 0.1);
}

@media (max-width: 480px) {
    .ccfm-phone-row {
        flex-direction: column;
        gap: 15px;
    }
    .ccfm-country-select {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .ccfm-form-container {
        padding: 30px 20px;
        margin: 20px 10px;
    }

    .ccfm-header h2 {
        font-size: 1.5rem;
    }

    /* Collapse all grids to 1 column */
    .ccfm-intervention-grid,
    .ccfm-user-type-grid,
    .ccfm-location-grid,
    .ccfm-city-grid,
    .ccfm-country-grid,
    .ccfm-urgency-grid,
    .ccfm-input-row {
        grid-template-columns: 1fr !important;
    }

    .ccfm-card-content {
        min-height: 70px;
    }

    .ccfm-card-img {
        width: 70px;
        height: 70px;
    }

    .ccfm-card-text {
        font-size: 0.8rem;
        padding-left: 35px;
    }

    .ccfm-navigation {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .ccfm-btn {
        width: 100%;
        padding: 15px 20px;
    }

    .ccfm-step h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .ccfm-card-text {
        padding-left: 30px;
        font-size: 0.75rem;
    }
}
