/* AEM Labs - Buyback Page Styles - High Converting Design */

.buyback-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.buyback-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content Layout */
.main-content {
    padding: 60px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

/* Form Section */
.form-section {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8edff;
}

.form-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #e0e7ff;
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-header h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.form-section-group {
    margin-bottom: 2.5rem;
}

.form-section-group h3 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    color: #333;
    font-weight: 700;
    position: relative;
    padding-left: 1rem;
}

.form-section-group h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e7ff;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.8rem;
}

.form-group input[type="file"] {
    padding: 8px;
}

/* Device Cards */
.devices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.devices-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.device-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.device-card:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    border-color: #667eea;
}

.condition-quantity-row {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e0e7ff;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.device-specs-row,
.console-specs-row {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #e8edff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
}

.device-specs-row:hover,
.console-specs-row:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.storage-group {
    grid-column: 1 / -1;
}

.storage-container {
    margin-bottom: 0.5rem;
}

.storage-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.storage-item select {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
}

.storage-item select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.remove-storage-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-storage-btn:hover {
    background: #c82333;
}

.add-storage-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.add-storage-btn:hover {
    background: #5568d3;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e7ff;
    position: relative;
}

.device-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.device-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.device-header h4::before {
    content: '💻';
    font-size: 1.2rem;
}

.remove-device-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.remove-device-btn:hover {
    background: #c82333;
}

/* Valuation Sidebar */
.valuation-sidebar {
    position: sticky;
    top: 120px; /* Account for header (100px) + spacing (20px) */
    align-self: start;
    height: fit-content;
    z-index: 10;
}

.valuation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: static;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    width: 100%;
}

.valuation-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.valuation-amount-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    vertical-align: top;
    margin-right: 0.25rem;
}

.amount {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.valuation-note {
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.valuation-breakdown {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    opacity: 0.9;
}

.breakdown-value {
    font-weight: 600;
}

.valuation-benefits {
    margin-top: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.benefit-item i {
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
}

.devices-header .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.devices-header .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* How It Works Simple */
.how-it-works-simple {
    padding: 60px 20px;
    background: white;
    text-align: center;
}

.how-it-works-simple h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #333;
}

.steps-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Errors */
.form-errors {
    background: #fee;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #721c24;
}

.form-errors ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* Pricing Charts Section */
.pricing-charts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e0e0e0;
}

.pricing-charts-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #333;
}

.pricing-charts-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.pricing-accordions {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 4rem; /* Extra padding at bottom to prevent clipping */
    margin-bottom: 3rem; /* Additional margin for breathing room */
}

.pricing-accordion {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pricing-accordion:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.pricing-accordion.active {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.accordion-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f0f0f0;
}

.pricing-accordion.active .accordion-header {
    background: #667eea;
    color: white;
}

.accordion-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.accordion-title {
    flex: 1;
}

.accordion-arrow {
    margin-left: 1rem;
}

.accordion-arrow i {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.pricing-accordion.active .accordion-content {
    padding: 1.5rem;
    padding-bottom: 4rem; /* Extra padding at bottom to prevent clipping */
    max-height: 5000px; /* Large enough for content */
    overflow: visible; /* Ensure content is visible */
}

.pricing-note {
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #555;
    font-style: italic;
}

.pricing-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    padding-bottom: 2rem; /* Extra padding to prevent clipping */
}

@media (min-width: 1200px) {
    .pricing-tables-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pricing-table-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e8edff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1rem;
}

.pricing-table-wrapper:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.pricing-table-wrapper h4 {
    margin: 0 0 1.25rem 0;
    font-size: 1.2rem;
    color: #333;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667eea;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: white;
}

.pricing-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pricing-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid #e8e9ea;
    color: #333;
    font-weight: 500;
}

.pricing-table tbody tr:hover {
    background: #f8f9ff;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.pricing-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.pricing-table tbody tr:nth-child(even):hover {
    background: #f8f9ff;
}

.table-section-header {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%) !important;
    font-weight: 700 !important;
    color: #667eea !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-section-header:hover {
    background: linear-gradient(135deg, #e8edff 0%, #e0e7ff 100%) !important;
    transform: none !important;
}

.pricing-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
}

.pricing-table th:last-child {
    text-align: right;
}

/* High Converting Enhancements */
.pricing-charts-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 4rem 20px;
    margin-top: 4rem;
}

.pricing-charts-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.pricing-charts-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.pricing-note {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0ff 100%);
    border-left: 4px solid #667eea;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    font-size: 1rem;
    color: #555;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.pricing-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
}

.pricing-table th:last-child {
    text-align: right;
}

/* High Converting Enhancements */
.pricing-charts-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 4rem 20px;
    margin-top: 4rem;
}

.pricing-charts-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.pricing-charts-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.pricing-note {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0ff 100%);
    border-left: 4px solid #667eea;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    font-size: 1rem;
    color: #555;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .valuation-sidebar {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .valuation-card {
        position: relative;
        top: 0;
    }
    
    .pricing-tables-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .amount {
        font-size: 2.5rem;
    }
    
    .steps-simple {
        grid-template-columns: 1fr;
    }
    
    .pricing-charts-title {
        font-size: 1.5rem;
    }
    
    .accordion-header {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .accordion-icon {
        font-size: 1.25rem;
        margin-right: 0.75rem;
    }
    
    .pricing-table-wrapper {
        padding: 1rem;
    }
    
    .pricing-table {
        font-size: 0.85rem;
    }
    
    .pricing-table th,
    .pricing-table td {
        padding: 0.5rem;
    }
    
    .devices-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .devices-header h3 {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .devices-header .btn-secondary {
        width: 100%;
    }
    
    .device-card {
        padding: 1.5rem;
    }
    
    .condition-quantity-row {
        margin-left: 0;
        margin-right: 0;
    }
}
