/* Modal Overlay */
.tc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tc-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.tc-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.tc-modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.tc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.tc-modal-header p {
    margin: 8px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Modal Body */
.tc-modal-body {
    padding: 30px;
}

/* Specification Table */
.tc-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.tc-spec-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    font-size: 14px;
    color: #555;
}

.tc-spec-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.tc-spec-table tr:last-child td {
    border-bottom: none;
}

.tc-spec-item-name {
    font-weight: 500;
    color: #333;
}

.tc-spec-item-price {
    text-align: right;
    font-weight: 600;
    color: #0066cc;
    white-space: nowrap;
}

/* Total Row */
.tc-spec-total {
    background: #e8f5e9;
    border-top: 3px solid #4caf50 !important;
}

.tc-spec-total td {
    padding: 16px 12px !important;
    font-size: 18px;
    font-weight: 700;
}

.tc-spec-total .tc-spec-item-name {
    color: #2e7d32;
}

.tc-spec-total .tc-spec-item-price {
    color: #2e7d32;
    font-size: 22px;
}

/* Info Text */
.tc-modal-info {
    background: #f0f8ff;
    padding: 15px;
    border-left: 4px solid #0066cc;
    margin-bottom: 20px;
    border-radius: 4px;
}

.tc-modal-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.tc-modal-info strong {
    color: #0066cc;
}

/* Copy Status */
.tc-copy-status {
    display: none;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
    font-size: 14px;
}

.tc-copy-status.show {
    display: block;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* Modal Footer */
.tc-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

/* Modal Buttons */
.tc-modal-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tc-modal-btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.tc-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
}

.tc-modal-btn-secondary {
    background: #fff;
    color: #555;
    border: 2px solid #ddd;
}

.tc-modal-btn-secondary:hover {
    border-color: #bbb;
    background: #f5f5f5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tc-modal {
        margin: 20px;
        max-height: 85vh;
    }
    
    .tc-modal-header {
        padding: 20px;
    }
    
    .tc-modal-header h2 {
        font-size: 20px;
    }
    
    .tc-modal-body {
        padding: 20px;
    }
    
    .tc-spec-table th,
    .tc-spec-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .tc-spec-total .tc-spec-item-price {
        font-size: 18px;
    }
    
    .tc-modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .tc-modal-btn {
        width: 100%;
        justify-content: center;
    }
}
