/**
 * Frontend Styles pentru Buyback System
 * Design inspirat din flip.ro
 */

/* ===== RESET & GENERAL ===== */
.bs-frontend * {
    box-sizing: border-box;
}

.bs-frontend {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
    background: #f9fafb;
}

.bs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bs-section {
    margin: 40px 0;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

/* ===== TYPOGRAPHY ===== */
.bs-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    text-align: center;
}

.bs-subtitle {
    font-size: 18px;
    color: #6B7280;
    text-align: center;
    margin-bottom: 40px;
}

.bs-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 20px;
    text-align: center;
}

.bs-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

/* ===== PROGRESS INDICATOR ===== */
.bs-progress-container {
    margin-bottom: 40px;
    padding: 0 20px;
}

.bs-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.bs-progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.bs-progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    height: 2px;
    background: #10B981;
    transition: width 0.5s ease;
    z-index: 2;
}

.bs-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

.bs-progress-circle {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-weight: 600;
    font-size: 14px;
    color: #6B7280;
    transition: all 0.3s ease;
}

.bs-progress-step.active .bs-progress-circle {
    border-color: #10B981;
    background: #10B981;
    color: white;
}

.bs-progress-step.completed .bs-progress-circle {
    border-color: #10B981;
    background: #10B981;
    color: white;
}

.bs-progress-step.completed .bs-progress-circle::before {
    content: '✓';
    font-size: 16px;
}

.bs-progress-label {
    margin-top: 8px;
    font-size: 12px;
    color: #6B7280;
    text-align: center;
    font-weight: 500;
}

.bs-progress-step.active .bs-progress-label {
    color: #10B981;
    font-weight: 600;
}

/* ===== DEVICE TYPE GRID ===== */
.bs-device-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bs-device-type-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 180px;
    justify-content: center;
}

.bs-device-type-card:hover {
    border-color: #10B981;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    text-decoration: none;
    color: inherit;
}

.bs-device-type-card.selected {
    border-color: #10B981;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.bs-device-type-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    border-radius: 12px;
    object-fit: contain;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.bs-device-type-card:hover .bs-device-type-icon {
    background: #ecfdf5;
    border-color: #10B981;
}

.bs-device-type-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.bs-device-type-description {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.4;
}

.bs-device-type-price-range {
    margin-top: 12px;
    padding: 8px 16px;
    background: #f0fdf4;
    border-radius: 20px;
    font-size: 12px;
    color: #059669;
    font-weight: 600;
}

/* ===== BRANDS GRID ===== */
.bs-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.bs-brand-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    justify-content: center;
}

.bs-brand-card:hover {
    border-color: #10B981;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
    text-decoration: none;
    color: inherit;
}

.bs-brand-card.selected {
    border-color: #10B981;
    background: #f0fdf4;
}

.bs-brand-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
    object-fit: contain;
    border-radius: 8px;
}

.bs-brand-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.bs-brand-popular {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===== DEVICES LIST ===== */
.bs-devices-list {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
}

.bs-device-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bs-device-card:hover {
    border-color: #10B981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.bs-device-card.selected {
    border-color: #10B981;
    background: #f0fdf4;
}

.bs-device-info {
    flex: 1;
}

.bs-device-name {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.bs-device-specs {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 8px;
}

.bs-device-condition {
    font-size: 12px;
    color: #059669;
    background: #f0fdf4;
    padding: 4px 12px;
    border-radius: 16px;
    display: inline-block;
}

.bs-device-price {
    text-align: right;
}

.bs-device-max-price {
    font-size: 24px;
    font-weight: 700;
    color: #10B981;
    margin-bottom: 4px;
}

.bs-device-price-label {
    font-size: 12px;
    color: #6B7280;
}

/* ===== EVALUATION FORM ===== */
.bs-evaluation-form {
    max-width: 600px;
    margin: 0 auto;
}

.bs-criteria-group {
    margin-bottom: 32px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #10B981;
}

.bs-criteria-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.bs-criteria-description {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bs-criteria-options {
    display: grid;
    gap: 12px;
}

.bs-criteria-option {
    position: relative;
}

.bs-criteria-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.bs-criteria-option label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.bs-criteria-option label:hover {
    border-color: #10B981;
    background: #f0fdf4;
}

.bs-criteria-option input[type="radio"]:checked + label {
    border-color: #10B981;
    background: #f0fdf4;
    color: #059669;
}

.bs-option-text {
    flex: 1;
}

.bs-option-impact {
    font-size: 14px;
    color: #059669;
    font-weight: 600;
    background: #dcfce7;
    padding: 4px 12px;
    border-radius: 16px;
}

.bs-option-impact.negative {
    color: #dc2626;
    background: #fef2f2;
}

/* ===== PRICE CALCULATOR ===== */
.bs-price-calculator {
    position: sticky;
    top: 20px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
    margin-bottom: 30px;
}

.bs-calculator-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.bs-price-display {
    text-align: center;
    margin-bottom: 20px;
}

.bs-current-price {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.bs-price-currency {
    font-size: 24px;
    opacity: 0.9;
}

.bs-price-note {
    font-size: 14px;
    opacity: 0.8;
    text-align: center;
    line-height: 1.4;
}

.bs-price-breakdown {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.bs-breakdown-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.9;
}

.bs-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bs-breakdown-item:last-child {
    border-bottom: none;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
}

/* ===== BUTTONS & ACTIONS ===== */
.bs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
}

.bs-btn-primary {
    background: #10B981;
    color: white;
}

.bs-btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    text-decoration: none;
    color: white;
}

.bs-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bs-btn-secondary {
    background: transparent;
    color: #6B7280;
    border: 2px solid #e5e7eb;
}

.bs-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    text-decoration: none;
    color: #374151;
}

.bs-btn-large {
    padding: 20px 40px;
    font-size: 18px;
    border-radius: 16px;
}

.bs-btn-block {
    width: 100%;
}

.bs-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* ===== FORM INPUTS ===== */
.bs-form-group {
    margin-bottom: 24px;
}

.bs-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.bs-form-label.required::after {
    content: ' *';
    color: #ef4444;
}

.bs-form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.bs-form-input:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.bs-form-input.error {
    border-color: #ef4444;
}

.bs-form-input.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.bs-form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.bs-form-help {
    margin-top: 6px;
    font-size: 14px;
    color: #6B7280;
    line-height: 1.4;
}

.bs-form-error {
    margin-top: 6px;
    font-size: 14px;
    color: #ef4444;
    display: block;
}

/* ===== CUSTOMER INFO FORM ===== */
.bs-customer-form {
    background: #f8fafc;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.bs-customer-form h3 {
    color: #10B981;
    margin-bottom: 24px;
    font-size: 20px;
    text-align: center;
}

.bs-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ===== LOADING STATES ===== */
.bs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #6B7280;
}

.bs-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #10B981;
    border-radius: 50%;
    animation: bs-spin 1s linear infinite;
}

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

/* ===== SUCCESS/ERROR STATES ===== */
.bs-message {
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bs-message-success {
    background: #f0fdf4;
    color: #059669;
    border-left: 4px solid #10B981;
}

.bs-message-error {
    background: #fef2f2;
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.bs-message-warning {
    background: #fffbeb;
    color: #d97706;
    border-left: 4px solid #f59e0b;
}

.bs-message-info {
    background: #f0f9ff;
    color: #0369a1;
    border-left: 4px solid #3b82f6;
}

/* ===== FINAL OFFER ===== */
.bs-final-offer {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.3);
}

.bs-offer-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.bs-offer-price {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.bs-offer-currency {
    font-size: 32px;
    opacity: 0.9;
}

.bs-offer-description {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.5;
}

.bs-offer-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.bs-offer-btn {
    padding: 16px 32px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 160px;
}

.bs-offer-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.bs-offer-btn-primary {
    background: white;
    color: #059669;
    border-color: white;
}

.bs-offer-btn-primary:hover {
    background: #f9fafb;
    color: #047857;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .bs-container {
        padding: 0 16px;
    }
    
    .bs-section {
        margin: 20px 0;
        padding: 20px;
        border-radius: 12px;
    }
    
    .bs-title {
        font-size: 24px;
    }
    
    .bs-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .bs-device-types-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .bs-device-type-card {
        padding: 16px;
        min-height: 140px;
    }
    
    .bs-device-type-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .bs-brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .bs-brand-card {
        padding: 16px;
        min-height: 100px;
    }
    
    .bs-brand-logo {
        width: 40px;
        height: 40px;
    }
    
    .bs-device-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .bs-device-price {
        margin-top: 16px;
        text-align: center;
    }
    
    .bs-progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .bs-progress-step {
        flex: 1;
        min-width: 80px;
    }
    
    .bs-progress-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .bs-progress-label {
        font-size: 10px;
    }
    
    .bs-current-price {
        font-size: 36px;
    }
    
    .bs-price-currency {
        font-size: 20px;
    }
    
    .bs-offer-price {
        font-size: 48px;
    }
    
    .bs-offer-currency {
        font-size: 24px;
    }
    
    .bs-offer-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .bs-offer-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .bs-action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .bs-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .bs-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bs-container {
        padding: 0 12px;
    }
    
    .bs-section {
        padding: 16px;
        margin: 16px 0;
    }
    
    .bs-device-types-grid {
        grid-template-columns: 1fr;
    }
    
    .bs-brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bs-criteria-group {
        padding: 16px;
    }
    
    .bs-price-calculator {
        padding: 20px;
    }
    
    .bs-customer-form {
        padding: 20px;
    }
    
    .bs-final-offer {
        padding: 24px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.bs-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== FOCUS STYLES ===== */
.bs-device-type-card:focus,
.bs-brand-card:focus,
.bs-device-card:focus,
.bs-btn:focus {
    outline: 2px solid #10B981;
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .bs-frontend {
        background: white;
        color: black;
    }
    
    .bs-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .bs-btn,
    .bs-action-buttons {
        display: none;
    }
    
    .bs-price-calculator {
        background: white;
        color: black;
        border: 1px solid #ccc;
    }
} 