/**
 * Repair Pages Shared Styles
 * Lowe's Sprinkler Repairs Site
 *
 * Shared styles for all repair guide pages
 */

/* ============================================
   REPAIR HERO SECTION
   ============================================ */
.repair-hero {
    /* background: linear-gradient(135deg, var(--lowes-blue) 0%, var(--lowes-blue-medium) 100%); */
    color: white;
    padding: var(--spacing-lg) var(--spacing-sm);
    text-align: center;
}

.repair-hero h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
}

.repair-hero p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   REPAIR CONTENT CONTAINER
   ============================================ */
.repair-content {
    padding: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   STEP CARDS
   ============================================ */
.step-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--action-red);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-right: var(--spacing-xs);
    flex-shrink: 0;
}

.step-card h3 {
    display: flex;
    align-items: center;
    color: var(--lowes-blue);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.step-card img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.step-card p,
.step-card ul,
.step-card ol {
    color: var(--text-dark);
    line-height: 1.7;
}

.step-card ul,
.step-card ol {
    padding-left: var(--spacing-md);
    margin-top: var(--spacing-xs);
}

.step-card li {
    margin-bottom: var(--spacing-xs);
}

.step-card-content {
    padding: 0;
}

/* ============================================
   TOOLS & SUPPLIES BOXES
   ============================================ */
.tools-supplies {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.tools-box,
.supplies-box {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
}

.tools-box h3,
.supplies-box h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--lowes-blue);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.tools-box ul,
.supplies-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tools-box li,
.supplies-box li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
}

.tools-box li:last-child,
.supplies-box li:last-child {
    border-bottom: none;
}

.supplies-box a {
    color: var(--lowes-blue);
    text-decoration: none;
}

.supplies-box a:hover {
    text-decoration: underline;
}

/* ============================================
   PARTS BOX (garden sprinkler page)
   ============================================ */
.parts-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
}

.parts-box h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--lowes-blue);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.parts-list {
    padding-left: 0;
    margin: 0;
    list-style: none;
    counter-reset: parts-counter;
}

.parts-list li {
    position: relative;
    padding: 12px 0 12px 44px;
    color: var(--text-dark);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-light);
    counter-increment: parts-counter;
}

.parts-list li::before {
    content: counter(parts-counter);
    position: absolute;
    left: 0;
    top: 12px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    min-height: 28px;
    max-height: 28px;
    background: var(--lowes-blue);
    color: white;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    line-height: 28px;
    text-align: center;
}

.parts-list li:last-child {
    border-bottom: none;
}

/* Capture section container */
#captureSection {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ============================================
   TIP BOX
   ============================================ */
.tip-box {
    background: rgba(0,73,144,0.08);
    border-left: 4px solid var(--lowes-blue);
    padding: var(--spacing-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--spacing-md) 0;
}

.tip-box h4 {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--lowes-blue);
    margin-bottom: var(--spacing-xs);
}

.tip-box p {
    margin: 0;
    color: var(--text-dark);
}

/* ============================================
   WARNING BOX
   ============================================ */
.warning-box {
    background: rgba(198, 40, 40, 0.08);
    border-left: 4px solid var(--action-red);
    padding: var(--spacing-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--spacing-md) 0;
}

.warning-box h4 {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--action-red);
    margin-bottom: var(--spacing-xs);
}

.warning-box p {
    margin: 0;
    color: var(--text-dark);
}

/* ============================================
   CAUSE GRID (low-pressure page)
   ============================================ */
.cause-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.cause-item {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--lowes-blue-medium);
}

.cause-item h4 {
    color: var(--lowes-blue);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.cause-item p {
    margin: 0;
    color: var(--text-dark);
}

/* ============================================
   HEAD TYPES GRID (broken-sprinkler-head page)
   ============================================ */
.head-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.head-type {
    background: var(--bg-light);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-light);
}

.head-type img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: var(--spacing-xs);
}

.head-type h4 {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
}

/* ============================================
   VIDEO SECTION
   ============================================ */
.video-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
}

.video-section h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

/* Video Release Notice */
.video-release-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid var(--lowes-blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.video-release-notice i {
    color: var(--lowes-blue);
    font-size: 1.1rem;
}

.video-release-notice .countdown {
    font-weight: 700;
    color: var(--lowes-blue);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   DETAIL IMAGE CONTAINER (garden sprinkler page)
   ============================================ */
.detail-image-container {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
}

.detail-image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.detail-image-header h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-dark);
    margin: 0;
}

.detail-image-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn-download {
    background: var(--accent-yellow);
    color: #000000;
    border: 2px solid #B8A000;
}

.btn-download:hover {
    background: var(--accent-yellow-hover);
}

.btn-fullscreen {
    background: var(--lowes-blue);
    color: var(--text-light);
}

.btn-fullscreen:hover {
    background: var(--lowes-blue-dark);
}

.detail-image-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.detail-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background: #f9f9f9;
}

.detail-image-wrapper:hover::after {
    content: 'Click to enlarge';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
}

.lightbox-actions {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.lightbox-actions .btn-icon {
    padding: 12px 20px;
}

/* ============================================
   RESPONSIVE - TABLET (600px+)
   ============================================ */
@media (min-width: 600px) {
    .repair-hero h1 {
        font-size: 2.25rem;
    }

    .tools-supplies {
        grid-template-columns: 1fr 1fr;
    }

    .head-types {
        grid-template-columns: repeat(4, 1fr);
    }

    .cause-grid {
        grid-template-columns: 1fr 1fr;
    }

}


/* ============================================
   RESPONSIVE - DESKTOP (768px+)
   ============================================ */
@media (min-width: 768px) {
    .repair-content {
        padding: var(--spacing-lg);
    }

    /* Only apply 2-column grid to step-cards that have images */
    .step-card.has-image {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
        align-items: start;
    }

    .step-card.has-image.reverse {
        direction: rtl;
    }

    .step-card.has-image.reverse > * {
        direction: ltr;
    }

    .step-card.has-image img {
        max-height: none;
        height: 100%;
        object-fit: cover;
    }

    .step-card-content {
        padding: var(--spacing-sm) 0;
    }
}
