/**
 * Gabiónová Kalkulačka - Frontend Styles
 */

.gabion-calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gc-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.gc-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.gc-section h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #555;
}

.gc-field {
    margin-bottom: 20px;
}

.gc-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.gc-field input[type="text"],
.gc-field input[type="email"],
.gc-field input[type="tel"],
.gc-field input[type="number"],
.gc-field select,
.gc-field textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.gc-field input:focus,
.gc-field select:focus,
.gc-field textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.gc-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.gc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gc-radio-group label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.gc-radio-group label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.gc-radio-group input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.gc-radio-group label input[type="radio"]:checked {
    accent-color: #0073aa;
}

.gc-radio-group label:has(input:checked) {
    border-color: #0073aa;
    background: #e6f3ff;
    font-weight: 600;
}

.gc-sub-options {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

/* Segmenty */
.gc-segment {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.gc-segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.gc-segment-header h3 {
    margin: 0;
    color: #0073aa;
}

/* Vrstvy */
.gc-layer {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.gc-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.gc-layer-header h4 {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Buttons */
.gc-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.gc-button-primary {
    background: #0073aa;
    color: #fff;
    font-size: 18px;
    padding: 15px 40px;
}

.gc-button-primary:hover {
    background: #005a87;
}

.gc-add-segment,
.gc-add-layer {
    background: #28a745;
    color: #fff;
}

.gc-add-segment:hover,
.gc-add-layer:hover {
    background: #218838;
}

.gc-remove-segment,
.gc-remove-layer {
    background: #dc3545;
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
}

.gc-remove-segment:hover,
.gc-remove-layer:hover {
    background: #c82333;
}

.gc-submit {
    text-align: center;
    margin-top: 40px;
}

/* Result messages */
#gc-result {
    margin-top: 30px;
}

.gc-success {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.gc-success h3 {
    color: #155724;
    margin-top: 0;
}

.gc-success p {
    font-size: 18px;
    margin: 10px 0;
}

.gc-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.gc-error h3 {
    color: #721c24;
    margin-top: 0;
}

.gc-error p {
    font-size: 16px;
}

/* Notes */
.note {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.gc-formula {
    font-size: 13px;
    color: #0073aa;
    font-weight: normal;
    font-style: italic;
    margin-left: 8px;
}

.description {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
}

/* Validácia - chybové stavy */
.gc-field.gc-field-error input.gc-error {
    border-color: #dc3545;
    background-color: #ffe6e6;
}

.gc-error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

/* Vizualizácia */
.gc-visualization {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #0073aa;
}

.gc-visualization h2 {
    border-bottom-color: #0073aa;
    color: #0073aa;
}

#gabion-visualizer-container {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

#gabion-visualizer-container svg {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.gc-viz-note {
    font-size: 13px;
    color: #0073aa;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .gabion-calculator-wrapper {
        padding: 10px;
    }
    
    .gc-section {
        padding: 20px 15px;
    }
    
    .gc-field-row {
        grid-template-columns: 1fr;
    }
    
    .gc-segment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #gabion-visualizer-container {
        min-height: 300px;
        padding: 5px;
    }
}

/* Súbory */
#gc-file-list {
    margin-top: 10px;
}

#gc-file-list ul {
    list-style-type: disc;
    margin: 5px 0;
    padding-left: 20px;
}

#gc-file-list li {
    margin: 3px 0;
    color: #2c5f2d;
    font-size: 14px;
}

#gc-file-input {
    display: block;
    margin: 10px 0;
    padding: 8px;
    border: 2px dashed #0073aa;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
}

#gc-file-input:hover {
    background: #f0f0f0;
    border-color: #005a87;
}
