/* ==========================================================================
   Brand Preview Generator - Frontend Styles
   ========================================================================== */

/* Open Button */
.bpg-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6c3fff, #a855f7);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(108, 63, 255, 0.3);
    font-family: inherit;
}

.bpg-open-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 63, 255, 0.4);
}

/* Overlay */
.bpg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: bpg-fadeIn 0.25s ease;
}

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

/* Modal */
.bpg-modal {
    background: #12121a;
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(108, 63, 255, 0.15);
    animation: bpg-slideUp 0.3s ease;
    color: #e0e0e8;
}

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

.bpg-modal::-webkit-scrollbar { width: 5px; }
.bpg-modal::-webkit-scrollbar-thumb { background: rgba(108,63,255,0.3); border-radius: 3px; }

/* Close */
.bpg-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.bpg-close:hover { background: rgba(255,255,255,0.15); }

/* Header */
.bpg-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #fff;
    font-weight: 700;
}
.bpg-subtitle {
    margin: 0 0 20px;
    color: #8888a0;
    font-size: 13px;
}

/* Progress */
.bpg-progress {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}
.bpg-progress-fill {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, #6c3fff, #a855f7);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.bpg-step-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #8888a0;
    margin-bottom: 24px;
}

/* Steps */
.bpg-step { animation: bpg-fadeIn 0.3s ease; }

.bpg-step h3 {
    font-size: 19px;
    color: #fff;
    margin: 0 0 6px;
    font-weight: 600;
}

.bpg-desc {
    color: #8888a0;
    font-size: 13px;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Fields */
.bpg-field {
    margin-bottom: 16px;
}
.bpg-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #c8c8d8;
}
.bpg-req { color: #f43f5e; }

.bpg-field input,
.bpg-field textarea {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.bpg-field input:focus,
.bpg-field textarea:focus {
    outline: none;
    border-color: #6c3fff;
    background: rgba(108,63,255,0.04);
}
.bpg-field input::placeholder,
.bpg-field textarea::placeholder {
    color: #555568;
}
.bpg-field textarea { resize: vertical; min-height: 80px; }

.bpg-field input.bpg-error,
.bpg-field textarea.bpg-error {
    border-color: #f43f5e;
}
.bpg-field .bpg-error-msg {
    color: #f43f5e;
    font-size: 11px;
    margin-top: 4px;
}

/* Mood Grid */
.bpg-mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.bpg-mood-card { cursor: pointer; }
.bpg-mood-card input { display: none; }

.bpg-mood-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: rgba(255,255,255,0.03);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    transition: all 0.2s;
    text-align: center;
}

.bpg-mood-card input:checked + .bpg-mood-content {
    border-color: #6c3fff;
    background: rgba(108,63,255,0.12);
    box-shadow: 0 0 12px rgba(108,63,255,0.15);
}
.bpg-mood-card:hover .bpg-mood-content {
    border-color: rgba(108,63,255,0.4);
}

.bpg-mood-icon { font-size: 24px; margin-bottom: 6px; }
.bpg-mood-name { font-size: 13px; font-weight: 600; color: #fff; }
.bpg-mood-desc { font-size: 10px; color: #8888a0; margin-top: 2px; }

/* Info Box */
.bpg-info-box {
    background: rgba(108,63,255,0.08);
    border: 1px solid rgba(108,63,255,0.2);
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
}
.bpg-info-box strong { color: #a78bfa; display: block; margin-bottom: 4px; font-size: 13px; }
.bpg-info-box p { margin: 0; color: #a0a0b8; font-size: 12px; line-height: 1.5; }

/* Footer */
.bpg-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.bpg-btn {
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.bpg-btn-back {
    background: rgba(255,255,255,0.08);
    color: #c8c8d8;
}
.bpg-btn-back:hover { background: rgba(255,255,255,0.12); }

.bpg-btn-next,
.bpg-btn-generate {
    background: linear-gradient(135deg, #6c3fff, #a855f7);
    color: #fff;
    margin-left: auto;
}
.bpg-btn-next:hover,
.bpg-btn-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,63,255,0.35);
}

/* Generating Animation */
.bpg-generating {
    text-align: center;
    padding: 30px 0;
}

.bpg-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(108,63,255,0.2);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: bpg-spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes bpg-spin { to { transform: rotate(360deg); } }

.bpg-gen-steps {
    text-align: left;
    max-width: 260px;
    margin: 24px auto 0;
}

.bpg-gen-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: #555568;
    transition: color 0.3s;
}
.bpg-gen-step.active { color: #a855f7; }
.bpg-gen-step.done { color: #22c55e; }

.bpg-gen-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    transition: background 0.3s;
    flex-shrink: 0;
}
.bpg-gen-step.active .bpg-gen-dot { background: #a855f7; box-shadow: 0 0 8px #a855f7; }
.bpg-gen-step.done .bpg-gen-dot { background: #22c55e; }

/* Success */
.bpg-success {
    text-align: center;
    padding: 30px 0;
}
.bpg-success-icon {
    width: 56px;
    height: 56px;
    background: rgba(34,197,94,0.15);
    border: 2px solid #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #22c55e;
    margin: 0 auto 16px;
}
.bpg-success h3 { color: #22c55e; }
.bpg-success-text { color: #8888a0; font-size: 14px; margin-bottom: 20px; }

.bpg-preview-link {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #6c3fff, #a855f7);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.bpg-preview-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,63,255,0.35);
}

/* Responsive */
@media (max-width: 600px) {
    .bpg-modal { padding: 24px 18px; }
    .bpg-mood-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .bpg-footer { flex-wrap: wrap; gap: 10px; }
    .bpg-btn { flex: 1; text-align: center; }
}
