/* ==========================================================================
   Novella Kitchens - Modern Multi-Step Kitchen Cost Calculator CSS
   ========================================================================== */

/* Progress Bar & Steps */
.calculator-progress-container {
    margin-bottom: 30px;
    padding: 0 10px;
}

.calculator-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.calculator-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
}

.calculator-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: #f7b402;
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.4s ease;
    width: 0%;
}

.calculator-progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #999;
    position: relative;
    z-index: 3;
    transition: all 0.4s ease;
    cursor: default;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.calculator-progress-step.active {
    border-color: #f7b402;
    color: #f7b402;
    box-shadow: 0 0 10px rgba(247, 180, 2, 0.3);
}

.calculator-progress-step.completed {
    border-color: #f7b402;
    background: #f7b402;
    color: #000;
}

.calculator-step-label {
    position: absolute;
    top: 38px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: #888;
    transition: color 0.4s ease;
}

.calculator-progress-step.active .calculator-step-label,
.calculator-progress-step.completed .calculator-step-label {
    color: #222;
}

/* Form Steps Panels */
.calculator-step-panel {
    display: none;
    animation: fadeInPanel 0.4s ease-out forwards;
}

.calculator-step-panel.active {
    display: block;
}

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

.calculator-step-panel h3 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    text-align: center;
    font-family: Arial, sans-serif;
}

.calculator-step-panel p.step-desc {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
    text-align: center;
    font-family: Arial, sans-serif;
}

/* Card Selection Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.calculator-card {
    background: #fafafa;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.calculator-card:hover {
    border-color: #ddd;
    background: #fdfdfd;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.calculator-card.selected {
    border-color: #f7b402;
    background: #fffdf5;
    box-shadow: 0 4px 12px rgba(247, 180, 2, 0.15);
}

.calculator-card-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    font-family: Arial, sans-serif;
}

.calculator-card-subtext {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

/* Checkmark indicator for selected cards */
.calculator-card::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free', 'FontAwesome', sans-serif;
    font-weight: 900;
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #f7b402;
    color: #000;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calculator-card.selected::after {
    opacity: 1;
    transform: scale(1);
}

/* Custom Dimensions inputs block */
.custom-dimensions-block {
    display: none;
    background: #fdfdfd;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-top: -10px;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 150px;
        margin-top: 0;
    }
}

.custom-dim-row {
    display: flex;
    gap: 12px;
}

.custom-dim-field {
    flex: 1;
}

.custom-dim-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

/* Dynamic Kitchen Shape Icons */
.shape-icon-container {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.shape-svg {
    stroke: #888;
    fill: none;
    stroke-width: 3px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.25s ease;
}

.calculator-card.selected .shape-svg {
    stroke: #f7b402;
    filter: drop-shadow(0 0 3px rgba(247, 180, 2, 0.3));
}

/* Form Fields Styling */
.cf-row {
    margin-bottom: 16px;
    position: relative;
}

.cf-row label.field-label {
    display: block;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    font-family: Arial, sans-serif;
}

.cf-row label.field-label span {
    color: #c0392b;
}

.cf-row input[type="text"],
.cf-row input[type="tel"],
.cf-row input[type="email"],
.cf-row textarea {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 7px 14px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-family: Arial, sans-serif !important;
    color: #222 !important;
    background: #fdfdfd !important;
    border: 1.5px solid #ddd !important;
    border-radius: 6px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.cf-row textarea {
    height: 60px !important;
    resize: none !important;
}

.cf-row input:focus,
.cf-row textarea:focus {
    border-color: #f7b402 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(247, 180, 2, 0.1) !important;
}

/* Error states */
.cf-row input.error,
.cf-row textarea.error {
    border-color: #e74c3c !important;
    background: #fffbfb !important;
}

.cf-row span.error-msg {
    color: #c0392b;
    font-size: 11px;
    display: block;
    margin-top: 4px;
    font-weight: 600;
}

/* Checkbox Style */
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 20px;
    user-select: none;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #f7b402;
    cursor: pointer;
}

.checkbox-row label {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-row label a {
    color: #f7b402;
    text-decoration: underline;
}

/* Button Navigation Group */
.calculator-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.calculator-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    outline: none;
}

.calculator-btn-back {
    background: #e0e0e0;
    color: #444;
}

.calculator-btn-back:hover {
    background: #d4d4d4;
}

.calculator-btn-next,
.calculator-btn-submit {
    background: #f7b402;
    color: #000;
}

.calculator-btn-next:hover,
.calculator-btn-submit:hover {
    background: #e0a300;
    box-shadow: 0 4px 10px rgba(247, 180, 2, 0.25);
}

.calculator-btn:disabled {
    background: #eaeaea;
    color: #aaa;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Success Popup Modal */
.calc-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calc-popup-overlay.show {
    display: flex;
    opacity: 1;
}

.calc-popup-card {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.calc-popup-overlay.show .calc-popup-card {
    transform: scale(1);
}

.calc-success-icon-container {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f7b402;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 20px rgba(247, 180, 2, 0.4);
    animation: pulse 2s infinite;
}

.calc-success-icon-container i {
    font-size: 32px;
    color: #000;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(247, 180, 2, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(247, 180, 2, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(247, 180, 2, 0);
    }
}

.calc-popup-card h4 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
}

.calc-popup-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Spinner for submit button */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .calculator-step-panel h3 {
        font-size: 16px;
    }
}

/* Specific Placeholder Overrides for Calculator Form (Overriding global white placeholder) */
#caluculatorForm input::placeholder,
#caluculatorForm textarea::placeholder {
    color: #888 !important;
    opacity: 1 !important; /* Firefox compatibility */
    
    font-size:12px;
}
#caluculatorForm input::-webkit-input-placeholder,
#caluculatorForm textarea::-webkit-input-placeholder {
    color: #888 !important;
}
#caluculatorForm input:-moz-placeholder,
#caluculatorForm textarea:-moz-placeholder {
    color: #888 !important;
    opacity: 1 !important;
}
#caluculatorForm input::-moz-placeholder,
#caluculatorForm textarea::-moz-placeholder {
    color: #888 !important;
    opacity: 1 !important;
}
#caluculatorForm input:-ms-input-placeholder,
#caluculatorForm textarea:-ms-input-placeholder {
    color: #888 !important;
}
