/* Main container */
.epoxy-grout-calculator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dark mode colors */
.dark .epoxy-grout-calculator {
    background-color: #181818 !important;
    color: #e0e0e0 !important;
}

.dark .card {
    background-color: #242424 !important;
}

.dark .card-header {
    background-color: #0e7f00 !important;
}

.dark .form-control, 
.dark .form-select {
    background-color: #333 !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

.dark .input-group-text {
    background-color: #444 !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

.dark .table {
    color: #e0e0e0 !important;
}

.dark .text-muted {
    color: #aaa !important;
}

.dark .border {
    border-color: #333 !important;
}

.dark .bg-light {
    background-color: #242424 !important;
}

.dark .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.dark .btn-outline-primary {
    color: #7776e7 !important;
    border-color: #7776e7 !important;
}

.dark .btn-outline-primary:hover {
    background-color: #5D5CDE !important;
    color: #fff !important;
}

.dark .btn-outline-secondary {
    color: #aaa !important;
    border-color: #666 !important;
}

.dark .btn-outline-secondary:hover {
    background-color: #666 !important;
    color: #fff !important;
}

/* Area section */
.grout-area-section {
    background-color: #f9f9f9;
    border-radius: 6px;
}

.dark .grout-area-section {
    background-color: #2a2a2a !important;
}

/* Form controls */
.epoxy-grout-calculator .form-control,
.epoxy-grout-calculator .form-select {
    font-size: 16px;
}

/* Button styles */
.epoxy-grout-calculator .btn-primary {
    background-color: #0e7f00;
    border-color: #0e7f00;
}

.epoxy-grout-calculator .btn-primary:hover {
    background-color: #0c6b00;
    border-color: #0c6b00;
}

.epoxy-grout-calculator .btn-outline-primary {
    color: #0e7f00;
    border-color: #0e7f00;
}

.epoxy-grout-calculator .btn-outline-primary:hover {
    background-color: #0e7f00;
    color: #fff;
}

.epoxy-grout-calculator .btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}

.epoxy-grout-calculator .btn-outline-success:hover {
    background-color: #28a745;
    color: #fff;
}

.epoxy-grout-calculator .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.epoxy-grout-calculator .btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

.epoxy-grout-calculator .btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

.epoxy-grout-calculator .btn-outline-info:hover {
    background-color: #17a2b8;
    color: #fff;
}

.epoxy-grout-calculator .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Tables */
.epoxy-grout-calculator .table {
    margin-bottom: 0;
}

/* Edit area name button */
.epoxy-grout-calculator .edit-area-name {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Action buttons in card footer */
.epoxy-grout-calculator .card-footer .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epoxy-grout-calculator .card-footer .btn i {
    font-size: 16px;
}

/* Watermark */
.epoxy-grout-calculator .watermark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Ctext x='50%25' y='50%25' font-family='Arial' font-size='20' fill='rgba(31,163,5,0.12)' text-anchor='middle' dominant-baseline='middle' transform='rotate(-30, 100, 100)'%3EKGR.Vietnam%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.5;
}

.epoxy-grout-calculator .card-body {
    position: relative;
    z-index: 1;
}

/* Product image styling */
.epoxy-grout-calculator #product-image-display,
.epoxy-grout-calculator #result-product-image {
    max-height: 150px;
    width: auto;
    margin: 0 auto;
    display: block;
}

/* Print styles */
@media print {
    .epoxy-grout-calculator {
        background-color: white !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
    
    .epoxy-grout-calculator .card {
        border: none !important;
    }
    
    .epoxy-grout-calculator .card-header {
        color: #000 !important;
        background-color: #f8f9fa !important;
        border-bottom: 1px solid #ddd !important;
        margin-bottom: 10px !important;
    }
    
    .epoxy-grout-calculator .btn,
    .epoxy-grout-calculator .form-control,
    .epoxy-grout-calculator .form-select,
    .epoxy-grout-calculator #grout-areas-container-,
    .epoxy-grout-calculator #grout-add-area-btn-,
    .epoxy-grout-calculator #products-collapse-,
    .epoxy-grout-calculator .card-footer {
        display: none !important;
    }
    
    .epoxy-grout-calculator .collapse {
        display: none !important;
    }
    
    /* Keep watermark for printing */
    .epoxy-grout-calculator .watermark {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: -1 !important;
        opacity: 0.3 !important;
        display: block !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Ctext x='50%25' y='50%25' font-family='Arial' font-size='20' fill='rgba(31,163,5,0.15)' text-anchor='middle' dominant-baseline='middle' transform='rotate(-30, 100, 100)'%3EKGR.Vietnam%3C/text%3E%3C/svg%3E") !important;
        background-repeat: repeat !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Ensure detailed results are shown when printing */
    .epoxy-grout-calculator #detailed-area-results- {
        display: block !important;
    }
    
    /* Make sure customer info is shown */
    .epoxy-grout-calculator #customer-info-display- {
        display: block !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .epoxy-grout-calculator .col-md-6 {
        margin-bottom: 15px;
    }
    
    .epoxy-grout-calculator .card-footer .btn-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .epoxy-grout-calculator .card-footer .btn {
        margin-bottom: 10px;
    }
}

/* Tooltips */
.tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #0e7f00;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    margin-left: 5px;
    cursor: help;
}

/* Advanced options toggle */
.advanced-options-toggle {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    color: #0e7f00;
    cursor: pointer;
}

/* Results section */
#grout-results-section {
    transition: all 0.3s ease;
}

/* Customer info section */
#customer-info-container {
    transition: all 0.3s ease;
}

/* Styles for clear input buttons */
.input-clear-btn {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    display: none;
}

.input-group:hover .input-clear-btn {
    display: block;
}

.input-clear-btn:hover {
    color: #dc3545;
}

/* Spinner for loading states */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Share modal social buttons */
.share-facebook {
    background-color: #3b5998;
    color: white !important;
    border-color: #3b5998 !important;
}

.share-facebook:hover {
    background-color: #2d4373 !important;
}

.share-twitter {
    background-color: #1da1f2;
    color: white !important;
    border-color: #1da1f2 !important;
}

.share-twitter:hover {
    background-color: #0c85d0 !important;
}

.share-whatsapp {
    background-color: #25d366;
    color: white !important;
    border-color: #25d366 !important;
}

.share-whatsapp:hover {
    background-color: #128c7e !important;
}

.share-email {
    background-color: #ea4335;
    color: white !important;
    border-color: #ea4335 !important;
}

.share-email:hover {
    background-color: #d62516 !important;
}

/* Custom card header color */
.epoxy-grout-calculator .card-header {
    background-color: #0e7f00 !important;
    color: white !important;
}

/* Always display watermark */
.epoxy-grout-calculator .watermark {
    display: block !important;
}

/* PDF container styling */
.pdf-container {
    position: relative;
    background-color: white;
}

.pdf-container .watermark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    display: block !important;
}