/* ========================================
   BRP Box Shop Instruction Page Styles
   Extracted from inline styles for better organization
   ======================================== */

.boxi-container {
    max-width: 1200px;
    margin: 0 auto;
    /*
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    */
    line-height: 1.6;
    color: #333;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.boxi-container * {
    box-sizing: border-box;
}

/* SEO Content - Hidden but crawlable by search engines */
.boxi-seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Print-only header - Hidden on screen, visible when printing */
.boxi-print-header {
    display: none;
    padding: 2rem 0;
    border-bottom: 2px solid #333;
    margin-bottom: 2rem;
}

.boxi-print-header h1 {
    margin: 0 0 1rem 0;
    font-size: 2rem;
    color: #333;
    text-align: center;
}

.boxi-print-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1rem;
    color: #666;
}

.boxi-print-time,
.boxi-print-products {
    font-weight: 600;
}

/* Header Section Styles */
.boxi-header {
    background: linear-gradient(135deg, #8B6F47 0%, #6B5436 100%);
    color: white;
    padding: 2rem;
}

.boxi-header-content {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 900px) {
    .boxi-header-content {
        grid-template-columns: minmax(280px, 40%) 1fr;
        gap: 2rem;
    }
}

.boxi-finished-box {
    position: relative;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.boxi-finished-box img {
    width: 100%;
    height: 200px;
    display: block;
    object-fit: cover;
    background: #f8f9fa;
}

.boxi-finished-box .boxi-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.boxi-time-callout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    font-style: oblique;
    color: white;
}

.boxi-time-callout svg {
    flex-shrink: 0;
}

.boxi-header-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: white !important;
}

.boxi-header-info p {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.boxi-applies {
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.boxi-applies-label {
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.boxi-products {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.boxi-product {
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.boxi-product:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
}

.boxi-progress-container {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 1rem;
}

.boxi-progress-bar {
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
}

.boxi-progress-fill {
    background: #4CAF50;
    height: 100%;
    width: 4.5%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.boxi-progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Header Controls Styles */
.boxi-header-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .boxi-header-controls {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .boxi-header-controls .boxi-btn {
        padding: 0.6rem 1rem;
        font-size: 13px;
    }
}

/* Email Form Styles */
.boxi-email-form {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.boxi-email-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.boxi-email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.boxi-email-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.boxi-email-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
    .boxi-email-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .boxi-email-input {
        width: 100%;
    }
}

/* Controls Section Styles */
.boxi-controls {
    padding: 1.5rem;
    background: #fcfaf9;
    border-bottom: 1px solid #ede9e6;
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.boxi-controls-right {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .boxi-controls {
        padding: 0.75rem 0.5rem;
        gap: 0.25rem;
        flex-wrap: nowrap;
        flex-direction: row;
    }
    
    .boxi-view-toggle {
        display: inline-flex;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .boxi-view-toggle button {
        padding: 0.25rem 0.35rem;
        font-size: 9px;
        gap: 1px;
        white-space: nowrap;
    }
    
    .boxi-controls-right {
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    .boxi-controls-right .boxi-btn {
        padding: 0.45rem 0.7rem;
        font-size: 12px;
        gap: 0.3rem;
        white-space: nowrap;
    }
    
    .boxi-controls-right .boxi-btn svg {
        width: 15px;
        height: 15px;
    }
    
    .boxi-controls-right #boxiResetBtn {
        padding: 0.5rem;
        font-size: 0;
        gap: 0;
    }
    
    .boxi-controls-right #boxiResetBtn svg {
        width: 18px;
        height: 18px;
    }
}

.boxi-btn {
    background: #D97706;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
}

.boxi-btn:hover {
    background: #EA580C;
    transform: translateY(-1px);
}

.boxi-btn-secondary {
    background: #78716C;
    color: white;
}

.boxi-btn-secondary:hover {
    background: #57534E;
}

.boxi-btn-success {
    background: #16A34A;
}

.boxi-btn-success:hover {
    background: #15803D;
}

.boxi-view-toggle {
    display: flex;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0dcda;
}

.boxi-view-toggle button {
    background: transparent;
    border: none;
    padding: 0.5rem .65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.boxi-view-toggle button.active {
    background: #D97706;
    color: white;
}

/* Carousel View Styles */
.boxi-carousel-container {
    position: relative;
    background: white;
}

.boxi-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 600px;
}

@media (max-width: 768px) {
    .boxi-carousel {
        height: 500px;
    }
}

.boxi-carousel::-webkit-scrollbar {
    display: none;
}

.boxi-slide {
    width: 100%;
    min-width: 100%;
    scroll-snap-align: start;
    padding: 1rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .boxi-slide {
        padding: 1rem;
        width: 100vw;
        min-width: 100vw;
    }
}

.boxi-slide img {
    width: 100%;
    max-width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .boxi-slide img {
        height: 300px;
        width: 100%;
        object-fit: cover;
    }
}

.boxi-slide-content {
    max-width: 600px;
}

/* Slideshow Control Panel - Light background, not overlay */
.boxi-slideshow-control {
    background: #fcfaf9;
    border-bottom: 1px solid #ede9e6;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.boxi-slideshow-step-text {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    flex: 1;
    margin: 0 1rem;
}

.boxi-slideshow-step-current {
    font-weight: 800;
    color: #8B4513;
    font-size: 1.1em;
}

.boxi-carousel-progress {
    background: #fcfaf9;
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid #ede9e6;
}

.boxi-carousel-progress .boxi-progress-bar {
    background: #ede9e6;
    border-radius: 8px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.boxi-carousel-progress .boxi-progress-fill {
    background: linear-gradient(90deg, #8B4513, #A0522D);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.boxi-carousel-progress .boxi-progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.boxi-progress-percentage {
    font-weight: bold;
    color: #8B4513;
}

.boxi-slide h2 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: #333;
}

.boxi-slide p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.boxi-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    color: #856404;
}

.boxi-warning strong {
    color: #d63384;
}

.boxi-nav-btn {
    background: #D97706;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.boxi-nav-btn:hover {
    background: #EA580C;
    transform: scale(1.1);
}

.boxi-nav-btn:disabled {
    background: rgba(108, 117, 125, 0.6);
    cursor: not-allowed;
    transform: none;
}

/* Mobile responsive for slideshow control */
@media (max-width: 768px) {
    .boxi-slideshow-control {
        padding: 0.75rem 1rem;
    }
    
    .boxi-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .boxi-slideshow-step-text {
        font-size: 1rem;
        margin: 0 0.5rem;
    }
}

/* List View Styles */
.boxi-steps-list {
    display: none;
    padding: 2rem;
}

.boxi-steps-list.active {
    display: block;
}

.boxi-step-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.boxi-step-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.boxi-step-header {
    background: #ede9e6;
    padding: 1rem 1.5rem;
    /*
    border-bottom: 1px solid #e9ecef;
    */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.boxi-step-header .boxi-step-number {
    margin: 0;
    background: #D97706;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.boxi-step-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.2rem;
}

.boxi-step-body {
    padding: 1.5rem;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .boxi-step-body {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.boxi-step-body img {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: cover;
    background: #f8f9fa;
}

/* Video Modal Styles */
.boxi-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.boxi-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.boxi-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.boxi-modal-header {
    background: linear-gradient(135deg, #8B6F47 0%, #6B5436 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.boxi-modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.boxi-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.boxi-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.boxi-modal-body {
    padding: 0;
}

.boxi-modal-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.boxi-modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Footer/Video Section Styles */
.boxi-video-section {
    padding: 2rem;
    background: #f8f9fa;
    text-align: center;
}

.boxi-video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.boxi-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .boxi-header {
        padding: 1.5rem 1rem;
    }
    
    .boxi-header-info h1 {
        font-size: 2rem;
    }
    
    .boxi-slide {
        padding: 1rem;
    }
    
    .boxi-step-body {
        grid-template-columns: 1fr;
    }
    
    .boxi-steps-list {
        padding: 1rem;
    }
    
    .boxi-video-section {
        padding: 1.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    .boxi-controls, .boxi-nav-controls, .boxi-video-section {
        display: none;
    }
    
    .boxi-carousel-container {
        display: none;
    }
    
    .boxi-steps-list {
        display: block !important;
    }
    
    .boxi-step-item {
        break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    /* Hide SEO content when printing to avoid duplication with generated steps list */
    .boxi-seo-content {
        display: none !important;
    }
    
    /* Hide complex header and show simple print header */
    .boxi-header {
        display: none !important;
    }
    
    .boxi-print-header {
        display: block !important;
    }
}
