/* --- Free Business Name Generator (Smart Cosmic - v2.2 - Reveal List) --- */

/* Prevent potential theme conflicts */
.scfbn-generator-wrap * {
    box-sizing: border-box; /* Ensure consistent box model */
}

/* Overall Wrapper */
.scfbn-generator-wrap {
    max-width: 800px; /* Adjust max-width as needed */
    margin: 40px auto;
    background-color: #ffffff; /* Light background */
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(126, 34, 206, 0.1); /* Subtle purple shadow */
    overflow: hidden; /* Contain elements */
    font-family: sans-serif; /* Modern base font */
}

/* Headings and Subtitles */
.scfbn-generator-wrap h2 {
    font-family: 'Montserrat', sans-serif;
    color: #7e22ce; /* Purple */
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.2em;
}

.scfbn-generator-wrap .scfbn-subtitle {
    text-align: center;
    color: #6b7280; /* Gray */
    margin-bottom: 35px;
    font-size: 1.1em;
}

.scfbn-generator-wrap h3 {
    font-family: 'Montserrat', sans-serif;
    color: #581c87; /* Darker Purple */
    margin-bottom: 25px;
    border-bottom: 2px solid #f3e8ff; /* Light purple underline */
    padding-bottom: 8px;
    font-size: 1.5em;
}


/* Progress Bar */
.scfbn-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align items to the top */
    margin-bottom: 40px;
    padding: 0 5%; /* Add some padding */
    position: relative;
}

.scfbn-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    width: 80px; /* Give steps some width */
    transition: all 0.3s ease;
}

.scfbn-step-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #e9d5ff; /* Light purple */
    color: #7e22ce;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-bottom: 8px;
    border: 3px solid #e9d5ff;
    transition: all 0.3s ease;
}

.scfbn-step-label {
    font-size: 0.9em;
    color: #a855f7; /* Medium Purple */
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Active & Completed Step Styles */
.scfbn-progress-step.active .scfbn-step-icon,
.scfbn-progress-step.completed .scfbn-step-icon {
    background-color: #7e22ce;
    color: #fff;
    border-color: #7e22ce;
}

.scfbn-progress-step.active .scfbn-step-label {
    color: #581c87; /* Darker Purple for active label */
    font-weight: 600;
}
.scfbn-progress-step.completed .scfbn-step-label {
    color: #7e22ce; /* Purple for completed label */
}


/* Connector Lines */
.scfbn-progress-connector {
    flex-grow: 1;
    height: 3px;
    background-color: #e9d5ff; /* Light purple */
    margin: 0 -15px; /* Overlap slightly */
    transform: translateY(17.5px); /* Align with center of icons */
    position: relative;
    z-index: 0;
}

.scfbn-progress-connector.completed {
    background-color: #7e22ce; /* Purple */
}


/* Steps Container */
#scfbn-cosmic-form {
    position: relative;
}

.scfbn-step {
    display: none; /* Hide inactive steps */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.scfbn-step.active {
    display: block;
    opacity: 1;
}


/* Form Elements Styling */
.scfbn-field-group {
    margin-bottom: 25px;
}

.scfbn-generator-wrap label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #374151; /* Dark Gray */
    font-size: 1em;
}

.scfbn-generator-wrap label.scfbn-required::after {
    content: " *";
    color: #ef4444; /* Red */
    font-weight: normal; /* Keep asterisk normal weight */
}

.scfbn-generator-wrap .scfbn-optional {
    color: #6b7280; /* Gray */
    font-weight: normal;
    font-size: 0.9em;
}

.scfbn-generator-wrap input[type="text"],
.scfbn-generator-wrap textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 5px; /* Space before error message */
    border: 1px solid #d1d5db; /* Lighter Gray Border */
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    color: #1f2937; /* Darker text */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scfbn-generator-wrap input[type="text"]:focus,
.scfbn-generator-wrap textarea:focus {
    border-color: #7e22ce; /* Purple border on focus */
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.3); /* Subtle purple glow */
    outline: none;
}

.scfbn-generator-wrap textarea {
    resize: vertical;
    min-height: 100px;
}

/* Cloud Options */
.scfbn-instructions {
    font-size: 0.9em;
    color: #6b7280; /* Gray */
    margin-bottom: 10px;
}

.scfbn-cloud-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 5px; /* Space before error message */
}

.scfbn-cloud-option {
    padding: 10px 18px;
    border: 2px solid #a855f7; /* Medium Purple */
    border-radius: 25px; /* Pill shape */
    cursor: pointer;
    background-color: #fff;
    color: #7e22ce;
    transition: all 0.2s ease-out;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
}

.scfbn-cloud-option:hover {
    background-color: #f3e8ff; /* Very light purple */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(126, 34, 206, 0.1);
}

.scfbn-cloud-option.selected {
    background: linear-gradient(135deg, #a855f7, #7e22ce); /* Purple Gradient */
    color: #fff;
    border-color: #7e22ce;
    transform: scale(1.03);
    box-shadow: 0 2px 5px rgba(126, 34, 206, 0.3);
}

/* Other Input */
.scfbn-other-input-group { /* Target the wrapper */
    display: none; /* Hidden by default */
    margin-top: 10px; /* Spacing when shown */
}
.scfbn-other-input {
    width: 70%; /* Don't take full width */
}

/* Refinement Grid (Step 4) */
.scfbn-refinement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px; /* Row gap, Column gap */
}

/* Navigation Buttons */
.scfbn-navigation {
    display: flex;
    justify-content: space-between; /* Push buttons apart */
    align-items: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb; /* Light separator line */
}

/* Base Button Styles */
.scfbn-generator-wrap button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

/* Previous Button */
.scfbn-prev-btn {
    background-color: #f3f4f6; /* Light Gray */
    color: #4b5563; /* Dark Gray Text */
    border: 1px solid #d1d5db;
}

.scfbn-prev-btn:hover {
    background-color: #e5e7eb;
}

/* Next/Generate Buttons */
.scfbn-next-btn,
.scfbn-generate-btn {
    background-color: #7e22ce; /* Purple */
    color: #fff;
}

.scfbn-next-btn:hover,
.scfbn-generate-btn:hover {
    background-color: #6b21a8; /* Darker Purple */
    box-shadow: 0 4px 15px rgba(126, 34, 206, 0.2);
    transform: translateY(-2px);
}

.scfbn-generate-btn {
    padding: 14px 30px;
    font-size: 1.1em;
}

/* Loading Spinner */
#scfbn-loading {
    text-align: center;
    padding: 40px 0;
    display: none; /* Hidden initially */
}

.scfbn-spinner {
    border: 5px solid #f3f4f6; /* Light grey */
    border-top: 5px solid #7e22ce; /* Purple */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: scfbn-spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

#scfbn-loading p {
    font-family: 'Montserrat', sans-serif;
    color: #7e22ce;
    font-weight: 500;
}

@keyframes scfbn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- NEW: Results Area Styling (Concept 3: Animated Reveal List) --- */
#scfbn-results-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed #e9d5ff; /* Dashed purple separator */
    /* Area itself is visible, but list starts empty */
}

#scfbn-results-list {
    display: grid;
    grid-template-columns: 1fr; /* Default single column */
    gap: 15px; /* Space between items */
    margin-bottom: 25px;
    list-style: none; /* Remove potential list bullets */
    padding: 0;
}

/* Define the reveal animation */
@keyframes scfbn-revealItem {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scfbn-reveal-item {
    position: relative; /* For positioning the copy button */
    padding: 18px 25px; /* Adjust padding as needed */
    background-color: #f9fafb; /* Very light grey/white background */
    border-radius: 8px;
    border-left: 4px solid #a855f7; /* Purple accent line */
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    overflow: hidden; /* Recommended if using complex hover effects */
    cursor: default; /* Default cursor for the item itself */

    /* Animation properties */
    opacity: 0; /* Start hidden */
    transform: translateY(20px) scale(0.98); /* Start slightly down and smaller */
    animation-name: scfbn-revealItem;
    animation-duration: 0.5s; /* Adjust duration */
    animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth easing */
    animation-fill-mode: forwards; /* Stay visible after animation */
    /* animation-delay is set dynamically via JS */
}

.scfbn-item-name {
    display: block; /* Ensure it takes block space */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em; /* Slightly larger for prominence */
    font-weight: 600;
    color: #581c87; /* Darker purple for text */
    margin-right: 50px; /* Space for the copy button */
    word-break: break-word;
}

.scfbn-reveal-item:hover {
    background-color: #f3e8ff; /* Light purple on hover */
    transform: translateY(-2px); /* Subtle lift */
    box-shadow: 0 5px 15px rgba(126, 34, 206, 0.1);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; /* Only transition hover effects */
}

/* Copy Button Styling */
.scfbn-copy-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%) translateX(10px); /* Start off-center */
    background-color: #7e22ce;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500; /* Match other buttons */
    white-space: nowrap; /* Prevent button text wrapping */
    opacity: 0; /* Hidden initially */
    transition: background-color 0.2s ease, opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.scfbn-reveal-item:hover .scfbn-copy-btn {
    opacity: 1; /* Show on hover */
    transform: translateY(-50%) translateX(0); /* Move into place */
}

.scfbn-copy-btn:hover {
    background-color: #6b21a8; /* Darker purple on button hover */
}

.scfbn-copy-btn.copied {
    background-color: #10b981; /* Green for copied state */
    /* Text change handled by JS */
}


/* Load More Button */
.scfbn-load-more-btn {
    display: block; /* Center */
    margin: 20px auto 0 auto;
    background-color: #f9fafb; /* Lighter background */
    color: #7e22ce;
    border: 1px solid #e9d5ff;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.scfbn-load-more-btn:hover {
    background-color: #f3e8ff;
    border-color: #a855f7;
    transform: translateY(-2px);
}


/* Error Message Styling */
.scfbn-error-message {
    color: #ef4444; /* Red */
    font-size: 0.9em;
    margin-top: 5px;
    display: none; /* Hidden by default */
}
#scfbn-error-display { /* Specific styles for the main error display if needed */
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
}


/* Style inputs/groups with errors */
.scfbn-field-group.error input,
.scfbn-field-group.error textarea,
.scfbn-field-group.error .scfbn-cloud-group { /* Add border to cloud group container on error */
    border-color: #ef4444 !important; /* Use important if necessary to override focus */
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}
.scfbn-field-group.error .scfbn-other-input { /* Ensure 'other' input also gets error style */
     border-color: #ef4444 !important;
     box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}


/* Responsive Adjustments */
@media only screen and (min-width: 769px) { /* Apply two-column layout on larger screens */
    #scfbn-results-list {
        grid-template-columns: repeat(2, 1fr); /* Two columns */
        gap: 20px; /* Adjust gap for two columns */
    }
}

@media only screen and (max-width: 768px) {
    .scfbn-generator-wrap {
        padding: 20px;
    }

    .scfbn-generator-wrap h2 {
        font-size: 1.8em;
    }
    .scfbn-generator-wrap h3 {
        font-size: 1.3em;
    }

    .scfbn-progress-bar {
        padding: 0; /* Remove padding */
        margin-bottom: 30px;
    }
    .scfbn-step-label {
        font-size: 0.8em; /* Smaller label */
    }
    .scfbn-step-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
        border-width: 2px;
    }
    .scfbn-progress-connector {
        transform: translateY(15px);
    }


    .scfbn-refinement-grid {
        grid-template-columns: 1fr; /* Stack refinement fields */
        gap: 15px;
    }

    .scfbn-navigation {
        flex-direction: column-reverse; /* Stack buttons, Next/Generate on top */
        gap: 15px;
    }
    .scfbn-generator-wrap button {
        width: 100%; /* Full width buttons */
    }

    #scfbn-results-list {
        grid-template-columns: 1fr; /* Ensure single column results on mobile */
        gap: 12px;
    }
    .scfbn-reveal-item {
        padding: 15px 20px;
    }
    .scfbn-item-name {
        font-size: 1.1em;
        margin-right: 45px; /* Adjust space for copy button */
    }
    .scfbn-copy-btn {
        padding: 6px 10px;
        font-size: 0.8em;
        right: 10px;
    }

    .scfbn-other-input {
        width: 100%; /* Full width on mobile */
    }
}

/* Screen Reader Text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}