/**
 * Frontend CSS for Tile Tools Calculator
 */

/* Main Container */
.ttc-calculator-wrapper {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
}

/* Title Styles */
.ttc-calculator-title {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Form Layout */
.ttc-calculator-form {
    margin-bottom: 25px;
}

.ttc-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 15px;
}

.ttc-form-field {
    flex: 1;
    min-width: 200px;
}

.ttc-full-width {
    width: 100%;
    flex-basis: 100%;
}

/* Form Elements */
.ttc-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.ttc-input,
.ttc-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px; /* Prevent zoom on mobile */
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.ttc-select {
    height: 42px;
}

.ttc-input:focus,
.ttc-select:focus {
    outline: none;
    border-color: #5D5CDE;
    box-shadow: 0 0 0 2px rgba(93, 92, 222, 0.2);
}

/* Buttons */
.ttc-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.ttc-button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    background-color: #f7f7f7;
    transition: all 0.2s ease;
}

.ttc-primary-button {
    background-color: #5D5CDE;
    color: white;
    border-color: #5D5CDE;
}

.ttc-button:hover {
    opacity: 0.9;
}

.ttc-primary-button:hover {
    background-color: #4b4ab2;
    border-color: #4b4ab2;
}

/* Results Section */
.ttc-results-container {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.ttc-results-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Tabs */
.ttc-tabs-container {
    margin-bottom: 20px;
}

.ttc-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ttc-tab {
    padding: 12px 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.ttc-tab.active {
    border-bottom-color: #5D5CDE;
    color: #5D5CDE;
    font-weight: 500;
}

.ttc-tab-content-container {
    padding: 20px 0;
}

.ttc-tab-content {
    display: none;
}

.ttc-tab-content.active {
    display: block;
}

/* Results Table */
.ttc-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.ttc-results-table th,
.ttc-results-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.ttc-results-table th {
    font-weight: 600;
    background-color: #f8f8f8;
}

.ttc-results-table tfoot tr {
    background-color: #f8f8f8;
}

.ttc-type-summary td {
    border-top: 2px solid #ddd;
}

.ttc-type-cost {
    font-weight: bold;
    color: #5D5CDE;
}

/* Summary & Notes */
.ttc-summary {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.ttc-note {
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ttc-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .ttc-form-field {
        width: 100%;
    }
    
    .ttc-results-table {
        font-size: 0.9rem;
    }
    
    .ttc-results-table th,
    .ttc-results-table td {
        padding: 8px 10px;
    }
    
    /* Responsive table */
    .ttc-results-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}