/* Moving Calculator Pro - Frontend Styles */
/* File: assets/css/calculator.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.mcp-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #d4d4d4;
    border-radius: 5px;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.mcp-header {
    background: #d4d4d4;
    padding: 20px;
    text-align: center;
}

.mcp-header h1 {
    color: #4a5568;
    font-size: 2em;
    font-weight: normal;
    margin: 0;
}

/* ========================================
   CALCULATOR PAGE STYLES
======================================== */

.mcp-calculator-page {
    display: block;
}

.mcp-section {
    margin: 0;
    background: white;
    border-bottom: 2px solid #d4d4d4;
}

.mcp-section-header {
    background: #5a6c7d;
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.mcp-section-title-left {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1em;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.mcp-section-stats {
    font-size: 0.95em;
    font-weight: normal;
}

.mcp-reset-btn {
    background: #f5b041;
    color: #333;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 15px;
    transition: background 0.3s;
}

.mcp-reset-btn:hover {
    background: #f39c12;
}

.mcp-toggle-icon {
    position: absolute;
    right: 20px;
    font-size: 1.2em;
    transition: transform 0.3s;
}

.mcp-section-header.collapsed .mcp-toggle-icon {
    transform: rotate(180deg);
}

.mcp-table-container {
    overflow-x: auto;
}

.mcp-table {
    width: 100%;
    border-collapse: collapse;
}

.mcp-table thead {
    background: #5dabb3;
    color: white;
}

.mcp-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    font-size: 0.95em;
    text-transform: uppercase;
}

.mcp-table thead th:nth-child(2),
.mcp-table thead th:nth-child(3),
.mcp-table thead th:nth-child(4),
.mcp-table thead th:nth-child(5) {
    text-align: center;
}

.mcp-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.mcp-table tbody tr:nth-child(even) {
    background: #f5f5f5;
}

.mcp-table tbody tr:nth-child(odd) {
    background: #e8e8e8;
}

.mcp-table tbody td {
    padding: 12px;
    color: #333;
}

.mcp-table tbody td:nth-child(2),
.mcp-table tbody td:nth-child(3),
.mcp-table tbody td:nth-child(4),
.mcp-table tbody td:nth-child(5) {
    text-align: center;
}

.mcp-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mcp-qty-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: #6b7280;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 3px;
    transition: background 0.3s;
}

.mcp-qty-btn:hover {
    background: #4b5563;
}

.mcp-qty-btn:active {
    transform: scale(0.95);
}

.mcp-qty-display {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 1em;
}

.mcp-total-cell {
    font-weight: bold;
    color: #333;
}

/* Global Summary Bar */
.mcp-global-summary {
    display: flex;
    background: white;
    border-top: 2px solid #d4d4d4;
}

.mcp-global-reset {
    background: #f5b041;
    color: #333;
    border: none;
    padding: 20px;
    font-weight: bold;
    font-size: 1em;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    flex: 1;
    transition: background 0.3s;
}

.mcp-global-reset:hover {
    background: #f39c12;
}

.mcp-summary-item {
    flex: 1;
    background: #5dabb3;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mcp-summary-label {
    font-size: 0.95em;
    font-weight: normal;
}

.mcp-summary-value {
    font-size: 1.8em;
    font-weight: bold;
}

.mcp-next-step-btn {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s, transform 0.2s;
}

.mcp-next-step-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
}

/* ========================================
   SUMMARY PAGE STYLES
======================================== */

.mcp-summary-page {
    display: none;
}

.mcp-summary-total-bar {
    background: #5a6c7d;
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcp-summary-totals {
    display: flex;
    background: #5dabb3;
    color: white;
}

.mcp-summary-totals > div {
    flex: 1;
    padding: 20px;
    text-align: center;
}

.mcp-label {
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.mcp-value {
    font-size: 2em;
    font-weight: bold;
}

.mcp-category-group {
    background: white;
    margin: 0;
    border-bottom: 2px solid #d4d4d4;
}

.mcp-category-header {
    background: #5a6c7d;
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcp-category-items {
    padding: 0;
}

.mcp-category-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mcp-category-item:nth-child(even) {
    background: #f5f5f5;
}

.mcp-category-item:nth-child(odd) {
    background: #e8e8e8;
}

.mcp-item-qty {
    background: #f5b041;
    color: #333;
    padding: 8px 20px;
    min-width: 60px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 20px;
    border-radius: 3px;
}

.mcp-item-name {
    flex: 1;
    display: flex;
    align-items: center;
    color: #333;
    font-size: 1em;
}

.mcp-quote-btn {
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 20px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s, transform 0.2s;
}

.mcp-quote-btn:hover {
    background: #152a47;
    transform: translateY(-2px);
}

.mcp-back-btn {
    background: transparent;
    border: none;
    color: #333;
    padding: 15px 20px;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    transition: color 0.3s;
}

.mcp-back-btn:hover {
    color: #5a6c7d;
}

.mcp-back-btn::before {
    content: '◀';
}

/* ========================================
   QUOTE FORM PAGE STYLES
======================================== */

.mcp-quote-form-page {
    display: none;
}

.mcp-back-to-summary-btn {
    background: #f5b041;
    color: #333;
    border: none;
    padding: 15px 20px;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.mcp-back-to-summary-btn:hover {
    background: #f39c12;
}

.mcp-quote-form {
    padding: 30px;
    background: white;
}

.mcp-required-note {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.mcp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.mcp-form-group {
    margin-bottom: 15px;
}

.mcp-form-group input,
.mcp-form-group select,
.mcp-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.mcp-form-group input:focus,
.mcp-form-group select:focus,
.mcp-form-group textarea:focus {
    outline: none;
    border-color: #5dabb3;
}

.mcp-form-group textarea {
    resize: vertical;
}

.mcp-form-section-title {
    color: #333;
    font-size: 1.1em;
    margin: 20px 0 10px 0;
}

.mcp-required-red {
    color: red;
    font-weight: normal;
    font-style: italic;
}

.mcp-consent-text {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

.mcp-submit-btn {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
}

.mcp-submit-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
}

.mcp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner for submit button */
.mcp-submit-btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: mcp-spinner 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes mcp-spinner {
    to { transform: rotate(360deg); }
}

.mcp-form-message {
    padding: 15px;
    margin: 20px 30px;
    border-radius: 3px;
    font-size: 1em;
}

.mcp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mcp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Empty state styling */
.mcp-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 20px;
}

.mcp-empty-state h2 {
    color: #666;
    margin-bottom: 15px;
}

.mcp-empty-state p {
    color: #999;
    font-size: 1.1em;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    .mcp-header h1 {
        font-size: 1.5em;
    }

    .mcp-section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding-right: 50px;
    }

    .mcp-section-title-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .mcp-reset-btn {
        margin: 10px 0 0 0;
        width: auto;
    }

    .mcp-table {
        font-size: 0.85em;
    }

    .mcp-qty-btn {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }

    .mcp-qty-display {
        min-width: 30px;
    }

    .mcp-global-summary {
        flex-direction: column;
    }

    .mcp-summary-value {
        font-size: 1.5em;
    }

    .mcp-summary-totals {
        flex-direction: column;
    }

    .mcp-value {
        font-size: 1.5em;
    }

    .mcp-form-row {
        grid-template-columns: 1fr;
    }

    .mcp-item-qty {
        min-width: 50px;
        padding: 5px 15px;
    }

    .mcp-quote-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .mcp-header h1 {
        font-size: 1.3em;
    }

    .mcp-table tbody td {
        padding: 8px;
        font-size: 0.9em;
    }

    .mcp-section-header {
        padding: 12px 15px;
        padding-right: 40px;
    }

    .mcp-next-step-btn,
    .mcp-quote-btn,
    .mcp-submit-btn {
        font-size: 1em;
        padding: 15px;
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    .mcp-qty-controls button,
    .mcp-next-step-btn,
    .mcp-quote-btn,
    .mcp-back-btn,
    .mcp-back-to-summary-btn,
    .mcp-global-reset,
    .mcp-reset-btn,
    .mcp-toggle-icon,
    .mcp-submit-btn {
        display: none !important;
    }

    .mcp-container {
        box-shadow: none;
    }

    .mcp-section-header {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .mcp-table-container {
        display: block !important;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */

.mcp-qty-btn:focus,
.mcp-next-step-btn:focus,
.mcp-quote-btn:focus,
.mcp-submit-btn:focus,
.mcp-back-btn:focus,
.mcp-back-to-summary-btn:focus,
.mcp-reset-btn:focus,
.mcp-global-reset:focus {
    outline: 2px solid #5dabb3;
    outline-offset: 2px;
}

.mcp-form-group input:focus,
.mcp-form-group select:focus,
.mcp-form-group textarea:focus {
    outline: 2px solid #5dabb3;
    outline-offset: 0;
}

/* Screen reader only text */
.mcp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes mcp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mcp-category-group {
    animation: mcp-fadeIn 0.3s ease-out;
}

/* ========================================
   UTILITY CLASSES
======================================== */

.mcp-hidden {
    display: none !important;
}

.mcp-text-center {
    text-align: center;
}

.mcp-mt-20 {
    margin-top: 20px;
}

.mcp-mb-20 {
    margin-bottom: 20px;
}

/* ========================================
   DARK MODE SUPPORT (Optional)
======================================== */

@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode support */
    /*
    .mcp-container {
        background: #2d3748;
    }
    
    .mcp-header h1 {
        color: #e2e8f0;
    }
    
    .mcp-section {
        background: #1a202c;
    }
    
    .mcp-table tbody tr:nth-child(even) {
        background: #2d3748;
    }
    
    .mcp-table tbody tr:nth-child(odd) {
        background: #1a202c;
    }
    
    .mcp-table tbody td {
        color: #e2e8f0;
    }
    */
}