/* Modal Overlay */
.tsc-calc-modal { 
    position: fixed; 
    z-index: 99999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.tsc-calc-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Box */
.tsc-calc-modal-content { 
    background-color: #ffffff; 
    padding: 32px; 
    width: 90%; 
    max-width: 420px; 
    border-radius: 16px; 
    position: relative; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.tsc-calc-modal.show .tsc-calc-modal-content {
    transform: translateY(0) scale(1);
}

/* Close Button */
.tsc-calc-close { 
    color: #94a3b8; 
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px; 
    line-height: 1;
    font-weight: 300; 
    cursor: pointer; 
    transition: color 0.2s ease, transform 0.2s ease;
}

.tsc-calc-close:hover, 
.tsc-calc-close:focus { 
    color: #0f172a; 
    text-decoration: none; 
    transform: scale(1.1);
}

/* Typography */
.tsc-calc-modal-content h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.025em;
}

/* Form Groups */
.tsc-calc-form-group { 
    margin-bottom: 20px; 
}

.tsc-calc-form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    font-size: 0.875rem;
    color: #475569;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Select Inputs */
.tsc-calc-select { 
    width: 100%; 
    padding: 12px 16px; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    font-size: 1rem;
    color: #334155;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    outline: none;
}

.tsc-calc-select:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.tsc-calc-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #e2e8f0;
}

/* Delivery Options Widget */
.tsc-delivery-options {
    margin: 20px 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.tsc-delivery-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.tsc-delivery-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tsc-delivery-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 0;
}

.tsc-delivery-icon {
    width: 64px;
    height: 64px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
    padding: 14px;
    box-sizing: border-box;
}

.tsc-delivery-icon svg {
    width: 100%;
    height: 100%;
}

.tsc-delivery-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.tsc-delivery-name {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 500;
}

.tsc-delivery-availability {
    font-size: 0.85rem;
    color: #6b7280;
}

.tsc-delivery-status-no {
    color: #1e293b;
    font-weight: 700;
}

/* Open Link */
.tsc-calc-link { 
    display: inline-flex;
    align-items: center;
    font-weight: 500; 
    color: #6b7280;
    text-decoration: none; 
    cursor: pointer; 
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.tsc-calc-link:hover {
    color: #374151;
    text-decoration: underline;
}

/* Results Box */
.tsc-calc-result {
    margin-top: 24px !important;
    padding: 16px !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-left: 4px solid #3b82f6 !important;
    border-radius: 6px;
    color: #1e3a8a;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: slideInFade 0.3s ease-out forwards;
}

@keyframes slideInFade {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}
