/**
 * PFConcept Frontend Styles
 * Version: 2.0.0
 * 
 * Consolidamento di tutti gli stili CSS frontend
 */

/* =================================================================
   BASE STYLES
   ================================================================= */

.pfconcept-wrapper {
    position: relative;
    margin: 20px 0;
}

/* =================================================================
   PRODUCT CALCULATOR
   ================================================================= */

.pfconcept-calculator {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.pfconcept-calculator h3 {
    color: #822659;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
}

.pfconcept-calculator .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.pfconcept-calculator .form-row label {
    flex: 0 0 150px;
    font-weight: 600;
    color: #333;
}

.pfconcept-calculator .form-row select,
.pfconcept-calculator .form-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.pfconcept-calculator .price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.pfconcept-calculator .price-item {
    text-align: center;
}

.pfconcept-calculator .price-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.pfconcept-calculator .price-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #822659;
}

/* Debug Window */
.pfconcept-debug-window {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.pfconcept-debug-window h4 {
    color: #3498db;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.pfconcept-debug-window .debug-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid #34495e;
}

.pfconcept-debug-window .debug-label {
    color: #95a5a6;
}

.pfconcept-debug-window .debug-value {
    color: #e74c3c;
    font-weight: bold;
}

/* =================================================================
   PRODUCT TABS
   ================================================================= */

.pfconcept-tabs-wrapper {
    margin: 2rem 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    clear: both;
}

.pfconcept-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f7f7f7;
    border-bottom: 2px solid #0073aa;
}

.pfconcept-tabs-nav li {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.pfconcept-tabs-nav li::before,
.pfconcept-tabs-nav li::after,
.pfconcept-tabs-nav li::marker {
    content: none !important;
    display: none !important;
}

.pfconcept-tabs-nav a {
    display: block;
    padding: 12px 20px;
    text-decoration: none !important;
    color: #333;
    background: transparent;
    border-right: 1px solid #ddd;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pfconcept-tabs-nav a:hover {
    background: #e9e9e9;
    color: #0073aa;
}

#pfconcept-tab-current a,
.pfconcept-tabs-nav li.active a {
    background: #0073aa;
    color: #fff !important;
}

.pfconcept-tabs-content {
    padding: 20px;
}

.pfconcept-tab-pane {
    animation: fadeIn 0.3s ease;
}

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

/* =================================================================
   GRID SYSTEM
   ================================================================= */

.pfconcept-grid {
    display: grid;
    gap: 1.25rem;
}

.pfconcept-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.pfconcept-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pfconcept-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* =================================================================
   CARD STYLES
   ================================================================= */

.pfconcept-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pfconcept-card-compact {
    padding: 0;
}

.pfconcept-card-body {
    padding: 1rem;
}

.pfconcept-card-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(130, 38, 89, 0.15);
    border-color: #a04073;
}

/* =================================================================
   TABLE STYLES
   ================================================================= */

.pfconcept-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.pfconcept-table th,
.pfconcept-table td {
    padding: 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.pfconcept-table th {
    background: #f9fafb;
    font-weight: 600;
}

.pfconcept-table-striped tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* =================================================================
   UTILITY CLASSES
   ================================================================= */

/* Text Alignment */
.pfconcept-text-left { text-align: left; }
.pfconcept-text-center { text-align: center; }
.pfconcept-text-right { text-align: right; }

/* Font Weight */
.pfconcept-font-normal { font-weight: 400; }
.pfconcept-font-medium { font-weight: 500; }
.pfconcept-font-semibold { font-weight: 600; }
.pfconcept-font-bold { font-weight: 700; }

/* Margins */
.pfconcept-m-0 { margin: 0; }
.pfconcept-mt-1 { margin-top: 0.25rem; }
.pfconcept-mt-2 { margin-top: 0.5rem; }
.pfconcept-mt-3 { margin-top: 0.75rem; }
.pfconcept-mt-4 { margin-top: 1rem; }
.pfconcept-mb-1 { margin-bottom: 0.25rem; }
.pfconcept-mb-2 { margin-bottom: 0.5rem; }
.pfconcept-mb-3 { margin-bottom: 0.75rem; }
.pfconcept-mb-4 { margin-bottom: 1rem; }
.pfconcept-mb-8 { margin-bottom: 2rem; }

/* Padding */
.pfconcept-p-0 { padding: 0; }
.pfconcept-p-1 { padding: 0.25rem; }
.pfconcept-p-2 { padding: 0.5rem; }
.pfconcept-p-3 { padding: 0.75rem; }
.pfconcept-p-4 { padding: 1rem; }

/* Text Sizes */
.pfconcept-text-xs { font-size: 0.75rem; }
.pfconcept-text-sm { font-size: 0.875rem; }
.pfconcept-text-base { font-size: 1rem; }
.pfconcept-text-lg { font-size: 1.125rem; }
.pfconcept-text-xl { font-size: 1.25rem; }

/* Colors */
.pfconcept-text-primary { color: #822659; }
.pfconcept-text-secondary { color: #6b7280; }
.pfconcept-text-success { color: #00a32a; }
.pfconcept-text-warning { color: #f56e28; }
.pfconcept-text-error { color: #d63638; }

/* Display */
.pfconcept-d-none { display: none; }
.pfconcept-d-block { display: block; }
.pfconcept-d-inline { display: inline; }
.pfconcept-d-inline-block { display: inline-block; }
.pfconcept-d-flex { display: flex; }

/* Images */
.pfconcept-img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 1200px) {
    .pfconcept-grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pfconcept-grid.cols-4,
    .pfconcept-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pfconcept-tabs-nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .pfconcept-calculator .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pfconcept-calculator .form-row label {
        flex: none;
        margin-bottom: 5px;
    }
    
    .pfconcept-tabs-nav {
        flex-direction: column;
    }
    
    .pfconcept-tabs-nav a {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .pfconcept-table-responsive {
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .pfconcept-grid.cols-4,
    .pfconcept-grid.cols-3,
    .pfconcept-grid.cols-2 {
        grid-template-columns: 1fr;
    }
    
    .pfconcept-tabs-content {
        padding: 1rem;
    }
    
    .pfconcept-price-display {
        flex-direction: column;
        gap: 15px;
    }
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .pfconcept-tabs-nav,
    .pfconcept-debug-window,
    .pfconcept-calculator button {
        display: none !important;
    }
    
    .pfconcept-tab-pane {
        display: block !important;
        page-break-inside: avoid;
    }
}

/* =================================================================
   ANIMATIONS
   ================================================================= */

.pfconcept-fade-in {
    animation: fadeIn 0.3s ease;
}

.pfconcept-slide-down {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   LOADING STATES
   ================================================================= */

.pfconcept-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.pfconcept-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #822659;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* =================================================================
   COMPATIBILITY FIXES
   ================================================================= */

/* Fix per Divi */
.et_pb_module .pfconcept-wrapper {
    margin: 0;
}

/* Fix per Elementor */
.elementor-widget .pfconcept-tabs-nav {
    padding-left: 0 !important;
}

/* Fix per WPBakery */
.vc_row .pfconcept-grid {
    margin: 0;
}