/**
 * SRT Configurator - Styles
 * Safe Range Tuning - Balistický ladicí a měřicí systém
 */

/* ===== LOADING STATE ===== */
.srt-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

/* ===== MAIN CONTAINER ===== */
#srt-configurator-root {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ===== HEADER ===== */
.srt-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 12px;
}

.srt-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.srt-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

/* ===== DISCOUNT BADGE ===== */
.srt-discount-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 15px;
}

/* ===== SECTIONS ===== */
.srt-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.srt-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

.srt-section-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ===== BARREL UNITS ===== */
.srt-barrel-unit {
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.srt-barrel-unit:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52,152,219,0.15);
}

.srt-barrel-unit.base-system {
    border-color: #27ae60;
    background: #e8f8f0;
}

.srt-barrel-unit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.srt-barrel-unit-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.srt-barrel-unit-badge {
    background: #27ae60;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.srt-remove-barrel {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.srt-remove-barrel:hover {
    background: #c0392b;
}

/* ===== FORM CONTROLS ===== */
.srt-form-group {
    margin-bottom: 25px;
}

.srt-label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 15px;
}

.srt-select,
.srt-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background: white;
}

.srt-select:focus,
.srt-input:focus {
    outline: none;
    border-color: #3498db;
}

.srt-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.srt-textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* ===== RADIO BUTTONS ===== */
.srt-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.srt-radio-option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.srt-radio-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.srt-radio-option.selected {
    border-color: #3498db;
    background: #e3f2fd;
}

.srt-radio-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 3px;
    cursor: pointer;
}

.srt-radio-label {
    flex: 1;
}

.srt-radio-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.srt-radio-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.srt-radio-price {
    font-weight: 600;
    color: #27ae60;
    white-space: nowrap;
    margin-left: 15px;
}

/* ===== CHAMBERS ===== */
.srt-chambers {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
}

.srt-chamber-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.srt-chamber-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.srt-chamber-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.srt-remove-chamber {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

/* ===== BUTTONS ===== */
.srt-button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.srt-button-primary {
    background: #3498db;
    color: white;
}

.srt-button-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}

.srt-button-secondary {
    background: #95a5a6;
    color: white;
}

.srt-button-secondary:hover {
    background: #7f8c8d;
}

.srt-button-success {
    background: #27ae60;
    color: white;
}

.srt-button-success:hover {
    background: #229954;
}

.srt-add-button {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    border: 2px dashed #95a5a6;
    border-radius: 6px;
    color: #7f8c8d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.srt-add-button:hover {
    border-color: #3498db;
    background: #e3f2fd;
    color: #3498db;
}

/* ===== PRICE SUMMARY ===== */
.srt-price-summary {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(39,174,96,0.3);
}

.srt-price-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.srt-price-total {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
}

.srt-price-breakdown {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
    font-size: 14px;
    opacity: 0.9;
}

.srt-price-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

/* ===== WARNINGS & ALERTS ===== */
.srt-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.srt-warning-icon {
    display: inline-block;
    margin-right: 8px;
    font-weight: bold;
}

.srt-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #721c24;
}

.srt-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #155724;
}

.srt-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #0c5460;
}

/* ===== CUSTOMER FORM ===== */
.srt-customer-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.srt-form-group.full-width {
    grid-column: 1 / -1;
}

/* ===== PROTOCOL ===== */
.srt-protocol {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    font-size: 14px;
}

.srt-protocol-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.srt-protocol-item {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.srt-protocol-item:last-child {
    border-bottom: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #srt-configurator-root {
        padding: 10px;
    }
    
    .srt-section {
        padding: 20px 15px;
    }
    
    .srt-header h1 {
        font-size: 24px;
    }
    
    .srt-customer-form {
        grid-template-columns: 1fr;
    }
    
    .srt-price-total {
        font-size: 36px;
    }
    
    .srt-barrel-unit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===== LOADING SPINNER ===== */
.srt-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== DISABLED STATE ===== */
.srt-disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}
