/**
 * Installation Guide Styles
 * Professional step-by-step guide with diagrams
 */

.installation-guide-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* =====================================================
   GUIDE HEADER
   ===================================================== */
.guide-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 48px 24px;
    background: linear-gradient(135deg, #0D3B6E 0%, #1565C0 100%);
    color: white;
    border-radius: 16px;
}

.guide-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    font-weight: 800;
}

.guide-header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* =====================================================
   SYSTEM OVERVIEW
   ===================================================== */
.system-overview-card {
    background: white;
    border: 3px solid #E2E8F0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.system-overview-card h2 {
    font-size: 1.75rem;
    color: #0D3B6E;
    margin-bottom: 24px;
    font-weight: 700;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.overview-item {
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.overview-item:hover {
    border-color: #1565C0;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(21, 101, 192, 0.15);
}

.overview-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.overview-label {
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 8px;
    font-weight: 600;
}

.overview-value {
    font-size: 1.125rem;
    color: #0D3B6E;
    font-weight: 700;
    margin-bottom: 4px;
}

.overview-spec {
    font-size: 0.875rem;
    color: #10B981;
    font-weight: 600;
}

/* =====================================================
   CIRCUIT DIAGRAM
   ===================================================== */
.circuit-diagram-card {
    background: white;
    border: 3px solid #1565C0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.15);
}

.circuit-diagram-card h2 {
    font-size: 1.75rem;
    color: #0D3B6E;
    margin-bottom: 24px;
    font-weight: 700;
    text-align: center;
}

.circuit-diagram-professional {
    background: white;
    border-radius: 12px;
    padding: 24px;
}

/* =====================================================
   INSTALLATION STEPS
   ===================================================== */
.installation-steps {
    margin-bottom: 32px;
}

.installation-steps > h2 {
    font-size: 1.75rem;
    color: #0D3B6E;
    margin-bottom: 32px;
    font-weight: 700;
    text-align: center;
}

.installation-step {
    background: white;
    border: 3px solid #E2E8F0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    transition: all 0.3s;
}

.installation-step:hover {
    border-color: #1565C0;
    box-shadow: 0 8px 24px rgba(21, 101, 192, 0.12);
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1565C0 0%, #0D3B6E 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.step-body {
    flex: 1;
}

.step-body h3 {
    font-size: 1.5rem;
    color: #0D3B6E;
    margin-bottom: 20px;
    font-weight: 700;
}

.step-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.step-instructions h4 {
    font-size: 1.125rem;
    color: #1565C0;
    margin-bottom: 12px;
    margin-top: 20px;
    font-weight: 700;
}

.step-instructions h4:first-child {
    margin-top: 0;
}

.step-instructions ul,
.step-instructions ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.step-instructions li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #334155;
}

.step-instructions strong {
    color: #0D3B6E;
    font-weight: 700;
}

/* =====================================================
   DIAGRAMS
   ===================================================== */
.step-diagram {
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px;
}

.wiring-diagram {
    background: white;
    border-radius: 8px;
    padding: 16px;
}

.wiring-specs {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.wiring-specs h4 {
    font-size: 1.125rem;
    color: #0D3B6E;
    margin-bottom: 16px;
    font-weight: 700;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #E2E8F0;
}

.specs-table td {
    padding: 12px 8px;
    font-size: 0.9375rem;
}

.specs-table td:first-child {
    color: #64748B;
    font-weight: 600;
}

.specs-table td:last-child {
    text-align: right;
    color: #0D3B6E;
}

.product-image-display {
    text-align: center;
}

.product-image-display img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
}

.image-caption {
    font-size: 0.875rem;
    color: #64748B;
    font-weight: 600;
}

/* =====================================================
   WARNING BOXES
   ===================================================== */
.warning-box {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.warning-box strong {
    display: block;
    color: #D97706;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.warning-box p {
    color: #92400E;
    margin: 0;
    line-height: 1.6;
}

.checklist-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.checklist-box h4 {
    font-size: 1.125rem;
    color: #0D3B6E;
    margin-bottom: 16px;
    font-weight: 700;
}

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist li {
    padding: 10px;
    margin-bottom: 8px;
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #334155;
    transition: all 0.2s;
}

.checklist li:hover {
    border-color: #10B981;
    background: #ECFDF5;
}

/* =====================================================
   SAFETY WARNINGS
   ===================================================== */
.safety-warnings-card {
    background: white;
    border: 3px solid #EF4444;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
}

.safety-warnings-card h2 {
    font-size: 1.75rem;
    color: #DC2626;
    margin-bottom: 24px;
    font-weight: 700;
    text-align: center;
}

.safety-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.safety-item {
    border-radius: 12px;
    padding: 20px;
    border: 3px solid;
}

.safety-item.danger {
    background: #FEE2E2;
    border-color: #EF4444;
}

.safety-item.warning {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.safety-item.caution {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.safety-item.info {
    background: #DBEAFE;
    border-color: #3B82F6;
}

.safety-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.safety-item h4 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.safety-item.danger h4 {
    color: #DC2626;
}

.safety-item.warning h4 {
    color: #D97706;
}

.safety-item.caution h4 {
    color: #D97706;
}

.safety-item.info h4 {
    color: #2563EB;
}

.safety-item p {
    margin: 0;
    line-height: 1.6;
    color: #334155;
}

/* =====================================================
   GUIDE ACTIONS
   ===================================================== */
.guide-actions {
    text-align: center;
    padding: 32px;
    background: #F8FAFC;
    border-radius: 16px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1023px) {
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .step-content-grid {
        grid-template-columns: 1fr;
    }
    
    .safety-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .guide-header h1 {
        font-size: 1.75rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .installation-step {
        flex-direction: column;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .guide-actions {
        flex-direction: column;
    }
    
    .guide-actions .btn {
        width: 100%;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .guide-actions {
        display: none;
    }
    
    .installation-step {
        page-break-inside: avoid;
    }
}

/* =====================================================
   PROFESSIONAL CIRCUIT DIAGRAM WITH PINPOINTS
   ===================================================== */
.professional-circuit-diagram {
    position: relative;
    background: #F8FAFC;
    border-radius: 12px;
    padding: 24px;
}

.diagram-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
    position: relative;
}

.diagram-section {
    position: relative;
}

.component-card {
    background: white;
    border: 3px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    height: 100%;
}

.component-card:hover {
    border-color: #1565C0;
    box-shadow: 0 8px 16px rgba(21, 101, 192, 0.15);
    transform: translateY(-4px);
}

.component-card.inverter-card {
    border-color: #1565C0;
    border-width: 4px;
}

.component-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E2E8F0;
}

.component-icon {
    font-size: 1.75rem;
}

.component-header h4 {
    font-size: 1.25rem;
    color: #0D3B6E;
    font-weight: 700;
    margin: 0;
}

.component-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-display {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.product-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
}

/* Pinpoint markers on images */
.pinpoint-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.pinpoint-label {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    white-space: nowrap;
    z-index: 11;
    pointer-events: none;
}

/* Product placeholder when no image */
.product-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-box {
    position: relative;
    width: 200px;
    height: 180px;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    border: 3px dashed #94A3B8;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.placeholder-box.large {
    width: 250px;
    height: 220px;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.placeholder-text {
    font-size: 0.875rem;
    color: #64748B;
    font-weight: 600;
    text-align: center;
    padding: 0 16px;
}

.placeholder-pinpoint {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    color: white;
}

/* Component info */
.component-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.9375rem;
}

.info-row strong {
    color: #0D3B6E;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #DBEAFE;
    color: #1565C0;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.badge.quantity {
    background: #FEF3C7;
    color: #D97706;
}

.badge.wiring {
    background: #ECFDF5;
    color: #10B981;
}

.voltage-label,
.wiring-label,
.backup-label {
    font-size: 0.875rem;
    color: #64748B;
    font-weight: 600;
}

/* Loads section */
.loads-display {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 8px;
    margin-bottom: 12px;
}

.load-icon-large {
    font-size: 3rem;
}

.load-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.load-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9375rem;
}

.load-item strong {
    color: #64748B;
    font-weight: 600;
}

.load-item span {
    color: #0D3B6E;
    font-weight: 700;
}

.appliances-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.appliance-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #334155;
}

/* Connection lines SVG */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

/* Wiring specifications panel */
.wiring-specs-panel {
    background: white;
    border: 3px solid #10B981;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.wiring-specs-panel h4 {
    font-size: 1.25rem;
    color: #0D3B6E;
    margin-bottom: 16px;
    font-weight: 700;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #F8FAFC;
    border-radius: 8px;
    border: 2px solid #E2E8F0;
}

.spec-item strong {
    color: #64748B;
    font-weight: 600;
}

.spec-item span {
    color: #0D3B6E;
    font-weight: 700;
}

/* Responsive for circuit diagram */
@media (max-width: 1023px) {
    .diagram-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .placeholder-box {
        width: 160px;
        height: 150px;
    }
    
    .placeholder-box.large {
        width: 180px;
        height: 170px;
    }
    
    .product-image {
        max-height: 180px;
    }
}
