/**
 * Premium Profile Builder CSS
 * Senna-guided sequenced interface with premium styling
 */

/* Import Playfair Display for questions */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --pb-primary: #1a3028;
    --pb-gold: #c9a961;
    --pb-cream: #f8f4ed;
    --pb-light-gray: #f5f5f5;
    --pb-text-dark: #1a3028;
    --pb-text-muted: #666;
    --pb-border: rgba(201, 169, 97, 0.2);
    --pb-shadow: 0 20px 60px rgba(26, 48, 40, 0.1);
    --pb-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fullscreen Container */
.sffc-profile-builder.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.sffc-profile-builder.active {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Premium Background */
.sffc-pb-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f4ed 0%, #fff 50%, #f8f4ed 100%);
    z-index: 1;
}

.sffc-pb-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(26, 48, 40, 0.03) 100%);
}

.sffc-pb-pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(201, 169, 97, 0.1) 35px, rgba(201, 169, 97, 0.1) 70px);
}

/* Main Container */
.sffc-pb-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    max-height: 700px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(26, 48, 40, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.6s ease;
}

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

/* Close Button */
.sffc-pb-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--pb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--pb-transition);
    z-index: 10;
}

.sffc-pb-close:hover {
    background: var(--pb-gold);
    border-color: var(--pb-gold);
    transform: rotate(90deg);
}

.sffc-pb-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--pb-text-dark);
}

/* Senna Section */
.sffc-pb-senna-section {
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--pb-border);
    background: linear-gradient(to bottom, rgba(248, 244, 237, 0.5), transparent);
}

.sffc-pb-senna-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.sffc-pb-senna-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--pb-gold);
    box-shadow: 0 8px 24px rgba(201, 169, 97, 0.3);
}

.sffc-pb-senna-status {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--pb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sffc-pb-senna-intro {
    flex: 1;
}

.sffc-pb-senna-name {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--pb-text-dark);
    margin: 0 0 4px 0;
}

.sffc-pb-senna-title {
    font-size: 14px;
    color: var(--pb-text-muted);
    margin: 0;
}

/* Question Area */
.sffc-pb-question-area {
    padding: 40px;
    min-height: 120px;
    display: flex;
    align-items: center;
}

.sffc-pb-question-text {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    line-height: 1.6;
    color: var(--pb-text-dark);
    font-weight: 500;
}

/* Typing Cursor */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--pb-gold);
    animation: blink 1s infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Answer Area */
.sffc-pb-answer-area {
    flex: 1;
    padding: 0 40px 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Text Input */
.sffc-pb-text-input-wrapper {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.sffc-pb-text-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid var(--pb-border);
    border-radius: 12px;
    background: white;
    transition: var(--pb-transition);
    font-family: 'Inter', sans-serif;
}

.sffc-pb-text-input:focus {
    outline: none;
    border-color: var(--pb-gold);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.1);
}

.sffc-pb-submit-btn {
    padding: 16px 24px;
    background: var(--pb-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pb-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sffc-pb-submit-btn:hover {
    background: var(--pb-gold);
    transform: translateX(4px);
}

/* Choice Grid */
.sffc-pb-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.sffc-pb-choice-btn {
    padding: 20px;
    background: white;
    border: 2px solid var(--pb-border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--pb-transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sffc-pb-choice-btn:hover {
    border-color: var(--pb-gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(201, 169, 97, 0.15);
}

.sffc-pb-choice-btn.selected {
    background: var(--pb-gold);
    border-color: var(--pb-gold);
    color: white;
    transform: scale(1.05);
}

.sffc-pb-choice-btn.not-selected {
    opacity: 0.4;
}

.choice-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.choice-label {
    font-size: 16px;
    font-weight: 600;
    color: inherit;
}

.choice-description {
    font-size: 12px;
    color: var(--pb-text-muted);
    margin-top: 4px;
}

.sffc-pb-choice-btn.selected .choice-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Multi Choice */
.sffc-pb-multi-choice-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.sffc-pb-selection-hint {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--pb-text-muted);
}

.selection-count {
    font-weight: 600;
    color: var(--pb-gold);
    margin-left: 8px;
}

.sffc-pb-multi-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.sffc-pb-multi-choice-btn {
    position: relative;
    padding: 16px;
    background: white;
    border: 2px solid var(--pb-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--pb-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sffc-pb-multi-choice-btn:hover {
    border-color: var(--pb-gold);
    transform: translateY(-2px);
}

.sffc-pb-multi-choice-btn.selected {
    background: var(--pb-cream);
    border-color: var(--pb-gold);
}

.choice-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--pb-gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transform: scale(0);
    transition: var(--pb-transition);
}

.sffc-pb-multi-choice-btn.selected .choice-check {
    opacity: 1;
    transform: scale(1);
}

/* Location Grid */
.sffc-pb-location-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.sffc-pb-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.sffc-pb-location-btn {
    position: relative;
    padding: 14px 16px;
    background: white;
    border: 2px solid var(--pb-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--pb-transition);
    text-align: center;
}

.sffc-pb-location-btn:hover {
    border-color: var(--pb-gold);
    background: var(--pb-cream);
}

.sffc-pb-location-btn.selected {
    background: var(--pb-gold);
    border-color: var(--pb-gold);
    color: white;
}

.location-name {
    font-size: 14px;
    font-weight: 500;
}

.location-selected {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid var(--pb-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pb-gold);
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: var(--pb-transition);
}

.sffc-pb-location-btn.selected .location-selected {
    opacity: 1;
    transform: scale(1);
}

/* Salary Grid */
.sffc-pb-salary-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.sffc-pb-salary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.sffc-pb-salary-btn {
    padding: 20px;
    background: white;
    border: 2px solid var(--pb-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--pb-transition);
    text-align: center;
    position: relative;
}

.sffc-pb-salary-btn:hover {
    border-color: var(--pb-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(201, 169, 97, 0.15);
}

.sffc-pb-salary-btn.selected {
    background: var(--pb-gold);
    border-color: var(--pb-gold);
    color: white;
}

.salary-label {
    font-size: 18px;
    font-weight: 600;
}

.salary-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

/* Skills Input */
.sffc-pb-skill-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.sffc-pb-skill-input-container {
    position: relative;
    margin-bottom: 24px;
}

.sffc-pb-skill-input {
    width: 100%;
    padding: 16px 120px 16px 20px;
    font-size: 16px;
    border: 2px solid var(--pb-border);
    border-radius: 12px;
    background: white;
    transition: var(--pb-transition);
}

.skill-count {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--pb-text-muted);
    font-weight: 600;
}

.sffc-pb-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    min-height: 40px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--pb-gold);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.remove-skill {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--pb-transition);
}

.remove-skill:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sffc-pb-skill-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.skill-suggestion {
    padding: 8px 16px;
    background: var(--pb-cream);
    border: 1px solid var(--pb-border);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--pb-transition);
}

.skill-suggestion:hover {
    background: var(--pb-gold);
    color: white;
    border-color: var(--pb-gold);
}

/* Continue Button */
.sffc-pb-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--pb-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pb-transition);
    margin: 0 auto;
}

.sffc-pb-continue-btn:hover:not(:disabled) {
    background: var(--pb-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(201, 169, 97, 0.3);
}

.sffc-pb-continue-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Completion Screen */
.sffc-pb-completion {
    text-align: center;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.completion-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.completion-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--pb-text-dark);
    margin-bottom: 24px;
}

.completion-summary {
    background: var(--pb-cream);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

.profile-summary {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    text-align: left;
}

.profile-summary li {
    padding: 8px 0;
    border-bottom: 1px solid var(--pb-border);
    font-size: 14px;
}

.profile-summary li:last-child {
    border-bottom: none;
}

.sffc-pb-view-matches-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--pb-gold);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pb-transition);
}

.sffc-pb-view-matches-btn:hover {
    background: var(--pb-primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(26, 48, 40, 0.3);
}

/* Progress Bar */
.sffc-pb-progress {
    padding: 20px 40px;
    border-top: 1px solid var(--pb-border);
    background: rgba(248, 244, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sffc-pb-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--pb-border);
    border-radius: 3px;
    overflow: hidden;
    margin-right: 20px;
}

.sffc-pb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pb-gold), var(--pb-primary));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.sffc-pb-progress-steps {
    font-size: 14px;
    color: var(--pb-text-muted);
    font-weight: 600;
}

.current-step {
    color: var(--pb-gold);
    font-size: 16px;
}

/* Navigation */
.sffc-pb-navigation {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--pb-border);
}

.sffc-pb-nav-back,
.sffc-pb-nav-skip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--pb-text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: var(--pb-transition);
}

.sffc-pb-nav-back:hover,
.sffc-pb-nav-skip:hover {
    color: var(--pb-gold);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sffc-pb-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .sffc-pb-senna-section {
        padding: 24px;
    }
    
    .sffc-pb-question-area {
        padding: 24px;
    }
    
    .sffc-pb-question-text {
        font-size: 20px;
    }
    
    .sffc-pb-answer-area {
        padding: 0 24px 24px;
    }
    
    .sffc-pb-choice-grid {
        grid-template-columns: 1fr;
    }
    
    .sffc-pb-multi-choice-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sffc-pb-location-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sffc-pb-salary-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.sffc-pb-answer-area::-webkit-scrollbar {
    width: 8px;
}

.sffc-pb-answer-area::-webkit-scrollbar-track {
    background: var(--pb-light-gray);
    border-radius: 4px;
}

.sffc-pb-answer-area::-webkit-scrollbar-thumb {
    background: var(--pb-gold);
    border-radius: 4px;
}

.sffc-pb-answer-area::-webkit-scrollbar-thumb:hover {
    background: var(--pb-primary);
}