/**
 * Ball Funnel Form CSS
 * Save as: /wp-content/plugins/christmas-ball-funnel/css/ball-funnel.css
 */

.ball-funnel-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.funnel-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.step {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    font-weight: bold;
    font-size: 18px;
    position: relative;
    transition: all 0.3s ease;
    z-index: 2;
}

.step.active {
    background: #0073aa;
    color: white;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.2);
}

.step.completed {
    background: #46b450;
    color: white;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 65px;
    top: 50%;
    width: 50px;
    height: 3px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.step.completed:not(:last-child)::after {
    background: #46b450;
}

/* Form Steps */
.form-step {
    display: none;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 500px;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.form-step h3 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    text-align: center;
    font-weight: 600;
}

.form-step h4 {
    margin: 20px 0 15px 0;
    color: #555;
    font-size: 18px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Option Grids */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.option-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,115,170,0.1), transparent);
    transition: left 0.5s ease;
}

.option-card:hover::before {
    left: 100%;
}

.option-card:hover {
    border-color: #0073aa;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,115,170,0.15);
}
.packaging-image img {
    width: 100%;
}
.option-card.selected {
    border-color: #0073aa;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 4px 15px rgba(0,115,170,0.2);
}

.option-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.option-card.disabled:hover {
    transform: none;
    border-color: #e0e0e0;
    box-shadow: none;
}

.option-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    border: none;
    padding: 0;
}

.option-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Color Group Selection - NEW STYLES */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.color-group-option {
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.color-group-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,115,170,0.1), transparent);
    transition: left 0.5s ease;
}

.color-group-option:hover::before {
    left: 100%;
}

.color-group-option:hover {
    border-color: #0073aa;
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0,115,170,0.2);
}

.color-group-option.selected {
    border-color: #0073aa;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 6px 20px rgba(0,115,170,0.25);
    transform: translateY(-3px);
}

.color-group-option img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid transparent;
    transition: all 0.3s ease;
}

.color-group-option:hover img,
.color-group-option.selected img {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.2);
}

.color-group-option div {
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.color-group-option small {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Packaging Selection - NEW STYLES */
.packaging-option {
    /* Uses same styles as option-card */
}
.packaging-image.layers,
.packaging-image.sets {
    width: 50%;
    margin: auto;
}

#packaging-sub-options {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.sub-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.packaging-sub-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.packaging-sub-option:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.packaging-sub-option.selected {
    border-color: #0073aa;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 4px 15px rgba(0,115,170,0.2);
}

.packaging-sub-option h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.packaging-sub-option p {
    margin: 0;
    color: #666;
    font-size: 14px;
}
.ball-preview {
    text-align: center;
    margin: 30px 0;
}

.ball-option {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.ball-option:hover {
    border-color: #0073aa;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,115,170,0.15);
}

.ball-option.selected {
    border-color: #0073aa;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 4px 15px rgba(0,115,170,0.2);
}

.ball-option img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: contain;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.ball-option:hover img,
.ball-option.selected img {
    border-color: #0073aa;
    width: 130px;
    height: 130px;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.2);
}

.ball-option h4 {
    margin: 10px 0 5px 0;
    color: #333;
    font-size: 16px;
    border: none;
    padding: 0;
}

.ball-option small {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

.error-message {
    color: #d63384;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0,115,170,0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87 0%, #004965 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,115,170,0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108,117,125,0.3);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,117,125,0.4);
}

.btn:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Thank You Page */
.thank-you {
    text-align: center;
    padding: 60px 30px;
    margin: auto;
}

.thank-you h3 {
    color: #46b450;
    margin-bottom: 20px;
    font-size: 28px;
}

.summary-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    text-align: left;
    border: 1px solid #dee2e6;
}

.summary-box h4 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.summary-box p {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-box p:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ball-funnel-wrapper {
        padding: 10px;
    }

    .form-step {
        padding: 20px;
        margin: 0 -10px;
    }

    .option-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

    .color-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 20px;
    }

    .color-group-option img {
        width: 100px;
        height: 100px;
    }

    .step {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin: 0 8px;
    }

    .step:not(:last-child)::after {
        width: 30px;
        left: 48px;
    }

    .btn-group {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }

    .form-step h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .option-grid {
        grid-template-columns: 1fr;
    }

    .color-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .color-group-option {
        padding: 20px 15px;
    }

    .color-group-option img {
        width: 80px;
        height: 80px;
    }

    .step-indicator {
        margin-bottom: 20px;
    }

    .step {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin: 0 5px;
    }

    .step:not(:last-child)::after {
        width: 20px;
        left: 40px;
    }
}


/* Funnel Styles*/ 

.option-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}
.packaging-description .packaging-sub-option.option-card {
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    -webkit-box-pack: start;
        -ms-flex-pack: start;
            justify-content: flex-start;
}
div#size-options {
    -ms-grid-columns: (1fr)[3];
    grid-template-columns: repeat(3, 1fr);
}
.packaging-description .packaging-image {
    min-height: 320px;
}
.packaging-description .sub-options-grid {
    -ms-grid-columns: (1fr)[2];
    grid-template-columns: repeat(2, 1fr);
    position: relative;
    padding-bottom: 70px;
}
.set-size-grid {
    -ms-grid-columns: 1fr 15px 1fr 15px 1fr 15px 1fr;
    grid-template-columns: repeat(4, 1fr);
    display: -ms-grid;
    display: grid;
    gap: 15px;
}
.crown-preview .option-grid {
    -ms-grid-columns: 1fr 15px 1fr;
    grid-template-columns: repeat(2, 1fr);
    display: -ms-grid;
    display: grid;
    gap: 15px;
}
div#crown-selection {
    width: 100%;
}
.packaging-sub-option.option-card[data-value="custom_packaging"] {
    position: absolute;
    bottom: 0;
    width: 100%;
}
.packaging-sub-option.option-card[data-value="custom_packaging"] .packaging-image {
    display: none;
}
.packaging-sub-option.option-card[data-value="custom_packaging"] {
    position: absolute;
    bottom: 0;
    width: 100%;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}
.packaging-description .option-card ul,
.packaging-description ul{
    padding: 0;
    text-align: left;
}
.packaging-description .packaging-sub-option.option-card p {
    text-align: left;
}
.option-grid {
    display: -ms-grid;
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
    -ms-grid-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
    grid-template-columns: repeat(4, 1fr);
    padding: 30px 40px;
}

.ball-funnel-wrapper div#step-5.form-step.active {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
}

.upload-section {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 20px;
    text-align: center;
}

.packaging-sub-option.option-card li,
.packaging-description ul{
    list-style: none;
}