/* ========================================
   HTSM Wooden Flooring Calculator Styles
   Brand Colors: Forest Green #1B4D3E, Timber Brown #8B4513
   ======================================== */

.htsm-flooring-calculator {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    font-family: 'EB Garamond', Georgia, serif;
}

.htsm-calc-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f0f0f0;
}

.htsm-calc-header h3 {
    font-size: 32px;
    margin: 0 0 10px 0;
    color: #1B4D3E;
    font-weight: 700;
}

.htsm-calc-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.htsm-calc-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.htsm-calc-section:last-child {
    border-bottom: none;
}

.htsm-calc-section h4 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
}

/* Tab Buttons */
.htsm-input-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.htsm-tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    background: white;
    color: #555;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.htsm-tab-btn:hover {
    border-color: #8B4513;
    background: #fef8f4;
}

.htsm-tab-btn.active {
    background: linear-gradient(135deg, #1B4D3E 0%, #2d6b54 100%);
    color: white;
    border-color: #1B4D3E;
}

/* Tab Content */
.htsm-tab-content {
    display: none;
}

.htsm-tab-content.active {
    display: block;
}

/* Unit Toggle */
.htsm-unit-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.htsm-unit-option {
    flex: 1;
    cursor: pointer;
}

.htsm-unit-option input {
    display: none;
}

.htsm-unit-option span {
    display: block;
    padding: 10px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    font-weight: 600;
    transition: all 0.3s;
}

.htsm-unit-option input:checked + span {
    background: linear-gradient(135deg, #1B4D3E 0%, #2d6b54 100%);
    color: white;
    border-color: #1B4D3E;
}

.htsm-unit-option:hover span {
    border-color: #8B4513;
}

/* Input Fields */
.htsm-input-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.htsm-input-field {
    display: flex;
    flex-direction: column;
}

.htsm-input-field label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.htsm-input-field input,
.htsm-timber-select select {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.htsm-input-field input:focus,
.htsm-timber-select select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.htsm-calculated-area {
    margin-top: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #1B4D3E;
    font-size: 16px;
}

.htsm-calculated-area strong {
    color: #1B4D3E;
    font-size: 18px;
}

/* Timber Selection */
.htsm-timber-select select {
    width: 100%;
    cursor: pointer;
}

.htsm-timber-info {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
}

.htsm-timber-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.htsm-detail-item {
    display: flex;
    flex-direction: column;
}

.htsm-detail-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.htsm-detail-value {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
}

/* Thickness Grid */
.htsm-thickness-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.htsm-thickness-option {
    cursor: pointer;
}

.htsm-thickness-option input {
    display: none;
}

.htsm-thickness-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.3s;
    text-align: center;
}

.htsm-thickness-card:hover {
    border-color: #8B4513;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.htsm-thickness-option input:checked + .htsm-thickness-card {
    background: linear-gradient(135deg, #1B4D3E 0%, #2d6b54 100%);
    border-color: #1B4D3E;
    color: white;
}

.htsm-thickness-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.htsm-thickness-desc {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.htsm-thickness-use {
    font-size: 12px;
    opacity: 0.8;
}

/* Finish Options */
.htsm-finish-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.htsm-finish-option {
    cursor: pointer;
}

.htsm-finish-option input {
    display: none;
}

.htsm-finish-card {
    display: flex;
    flex-direction: column;
    padding: 25px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.3s;
}

.htsm-finish-card:hover {
    border-color: #8B4513;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.htsm-finish-option input:checked + .htsm-finish-card {
    background: linear-gradient(135deg, #1B4D3E 0%, #2d6b54 100%);
    border-color: #1B4D3E;
    color: white;
}

.htsm-finish-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.htsm-finish-price {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.9;
}

.htsm-finish-desc {
    font-size: 13px;
    opacity: 0.8;
}

/* Checkbox Options */
.htsm-checkbox-option {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.htsm-checkbox-option:hover {
    border-color: #8B4513;
    background: #fef8f4;
}

.htsm-checkbox-option input {
    margin-right: 15px;
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.htsm-checkbox-label {
    display: flex;
    flex-direction: column;
}

.htsm-checkbox-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.htsm-checkbox-desc {
    font-size: 14px;
    color: #666;
}

/* Calculate Button */
.htsm-calc-actions {
    text-align: center;
    margin-top: 30px;
}

.htsm-calc-btn {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    color: white;
    border: none;
    padding: 18px 60px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.htsm-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.htsm-calc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.htsm-btn-icon {
    margin-right: 10px;
}

/* Loading Animation */
.htsm-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: htsm-spin 0.8s linear infinite;
}

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

/* Results Section */
.htsm-calc-results {
    margin-top: 30px;
}

.htsm-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

.htsm-results-header h4 {
    font-size: 26px;
    color: #1B4D3E;
    margin: 0;
}

.htsm-reset-btn {
    background: transparent;
    color: #8B4513;
    border: 2px solid #8B4513;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.htsm-reset-btn:hover {
    background: #8B4513;
    color: white;
}

.htsm-results-summary {
    background: linear-gradient(135deg, #1B4D3E 0%, #2d6b54 100%);
    color: white;
    padding: 35px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
}

.htsm-result-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.htsm-result-value {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.htsm-result-breakdown {
    font-size: 15px;
    opacity: 0.85;
}

.htsm-results-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.htsm-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.htsm-result-row:last-child {
    border-bottom: none;
}

.htsm-result-highlight {
    background: white;
    margin: 10px -10px;
    padding: 15px 10px;
    border-radius: 6px;
    border-left: 4px solid #8B4513;
}

.htsm-result-item-label {
    font-size: 15px;
    color: #555;
}

.htsm-result-item-value {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.htsm-results-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.htsm-action-btn {
    flex: 1;
    padding: 16px;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-block;
}

.htsm-btn-primary {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.htsm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.htsm-btn-secondary {
    background: transparent;
    color: #8B4513;
    border: 2px solid #8B4513;
}

.htsm-btn-secondary:hover {
    background: #8B4513;
    color: white;
}

.htsm-results-note {
    padding: 20px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.htsm-results-note p {
    margin: 0;
    font-size: 14px;
    color: #856404;
    line-height: 1.6;
}

/* Quote Form */
.htsm-quote-form {
    margin: 25px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1B4D3E;
}

.htsm-quote-form h4 {
    font-size: 20px;
    color: #1B4D3E;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.htsm-quote-form-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
}

.htsm-quote-form-fields {
    display: grid;
    gap: 15px;
}

.htsm-quote-form-fields .htsm-input-field {
    margin: 0;
}

.htsm-quote-form-fields textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.htsm-quote-form-fields textarea:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

/* Quote Success Message */
.htsm-quote-success {
    margin: 20px 0;
    padding: 20px;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    text-align: center;
}

.htsm-quote-success p {
    margin: 0;
    color: #155724;
    font-size: 16px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .htsm-flooring-calculator {
        padding: 25px 20px;
    }
    
    .htsm-calc-header h3 {
        font-size: 24px;
    }
    
    .htsm-input-row,
    .htsm-timber-details {
        grid-template-columns: 1fr;
    }
    
    .htsm-thickness-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .htsm-finish-options {
        grid-template-columns: 1fr;
    }
    
    .htsm-results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .htsm-result-value {
        font-size: 36px;
    }
    
    .htsm-results-actions {
        flex-direction: column;
    }
    
    .htsm-input-tabs {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .htsm-thickness-grid {
        grid-template-columns: 1fr;
    }
    
    .htsm-calc-btn {
        padding: 16px 40px;
        font-size: 16px;
    }
}
