/* ============================================
   Nail Style Finder - Frontend Styles
   ============================================ */

/* Quiz Wrapper */
.nsf-quiz-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.nsf-quiz-header {
    text-align: center;
    margin-bottom: 30px;
}

.nsf-quiz-title {
    font-size: 2em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #e91e63, #f48fb1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nsf-quiz-subtitle {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

/* Progress Bar */
.nsf-progress-bar {
    background: #f0f0f0;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.nsf-progress-fill {
    background: linear-gradient(90deg, #e91e63, #f48fb1);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.nsf-progress-text {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 0.9em;
    color: #888;
}

/* Question Steps */
.nsf-question-step {
    animation: nsfFadeIn 0.4s ease;
}

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

.nsf-question-header {
    text-align: center;
    margin-bottom: 25px;
}

.nsf-question-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 10px;
}

.nsf-question-text {
    font-size: 1.5em;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

/* Answers Grid */
.nsf-answers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .nsf-answers-grid {
        grid-template-columns: 1fr;
    }
}

.nsf-answer-option {
    cursor: pointer;
    display: block;
}

.nsf-answer-input {
    position: absolute;
    opacity: 0;
}

.nsf-answer-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nsf-answer-card:hover {
    border-color: #e91e63;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.15);
}

.nsf-answer-input:checked + .nsf-answer-card {
    border-color: #e91e63;
    background: linear-gradient(135deg, #fff0f3, #fff);
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.2);
}

.nsf-answer-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.nsf-answer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nsf-answer-text {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.nsf-answer-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.nsf-answer-check svg {
    width: 14px;
    height: 14px;
    color: #fff;
    opacity: 0;
}

.nsf-answer-input:checked + .nsf-answer-card .nsf-answer-check {
    background: #e91e63;
    border-color: #e91e63;
}

.nsf-answer-input:checked + .nsf-answer-card .nsf-answer-check svg {
    opacity: 1;
}

/* Navigation Buttons */
.nsf-quiz-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.nsf-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nsf-btn-prev {
    background: #f0f0f0;
    color: #666;
}

.nsf-btn-prev:hover {
    background: #e0e0e0;
}

.nsf-btn-next,
.nsf-btn-submit {
    background: linear-gradient(135deg, #e91e63, #f48fb1);
    color: #fff;
    margin-left: auto;
}

.nsf-btn-next:hover,
.nsf-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.nsf-btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.nsf-quiz-loading {
    text-align: center;
    padding: 60px 20px;
}

.nsf-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f0f0f0;
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: nsfSpin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.nsf-quiz-loading p {
    color: #666;
    font-size: 1.1em;
}

/* Result Container */
.nsf-quiz-result {
    animation: nsfFadeIn 0.6s ease;
}

.nsf-result-content {
    text-align: center;
    padding: 20px;
}

.nsf-result-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #e91e63, #f48fb1);
    color: #fff;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nsf-result-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 15px;
    line-height: 1.3;
}

.nsf-result-description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Blog Section */
.nsf-result-blog-section {
    background: #fafafa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.nsf-result-blog-section h4 {
    margin: 0 0 15px;
    color: #333;
    font-size: 1em;
}

.nsf-result-blog-card {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: left;
}

.nsf-blog-image {
    width: 120px;
    min-height: 120px;
    background: #f0f0f0;
    flex-shrink: 0;
}

.nsf-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nsf-blog-info {
    padding: 15px;
    flex: 1;
}

.nsf-blog-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a2e;
}

.nsf-blog-excerpt {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.4;
}

.nsf-blog-link {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #e91e63, #f48fb1);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.nsf-blog-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    color: #fff;
}

/* Result Actions */
.nsf-result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.nsf-btn-retake {
    background: #f0f0f0;
    color: #666;
}

.nsf-btn-retake:hover {
    background: #e0e0e0;
}

.nsf-btn-share {
    background: #1a1a2e;
    color: #fff;
}

.nsf-btn-share:hover {
    background: #2d2d44;
}

/* Style Variants */
.nsf-style-minimal .nsf-quiz-title {
    background: none;
    -webkit-text-fill-color: #1a1a2e;
    color: #1a1a2e;
}

.nsf-style-minimal .nsf-answer-card {
    border-radius: 4px;
}

.nsf-style-minimal .nsf-btn-next,
.nsf-style-minimal .nsf-btn-submit {
    background: #1a1a2e;
}

/* Color Choice Specific */
.nsf-type-color_choice .nsf-answer-card {
    padding: 15px;
}

.nsf-type-color_choice .nsf-answer-text {
    text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
    .nsf-quiz-wrapper {
        padding: 10px;
    }

    .nsf-quiz-title {
        font-size: 1.5em;
    }

    .nsf-question-text {
        font-size: 1.2em;
    }

    .nsf-result-blog-card {
        flex-direction: column;
    }

    .nsf-blog-image {
        width: 100%;
        height: 150px;
    }
}
