/* static/style.css */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

h2 {
    color: #2c3e50;
}

.info-box {
    background-color: #e7f5fe;
    border-left: 4px solid #2196F3;
    padding: 10px 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 15px;
}

/* Radio group for input unit selection */
.radio-group {
    display: flex;
    gap: 12px;
    align-items: center;
}
.radio-group label {
    font-weight: normal;
    cursor: pointer;
}
.radio-group input[type="radio"] {
    margin-right: 6px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    padding: 12px 25px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

button:hover {
    background: #45a049;
}

.button-group {
    text-align: center;
    gap: 10px;
    margin-top: 20px;
}

/* Collapsible section */
.collapsible {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.collapsible-header {
    background-color: #f9f9f9;
    padding: 12px 15px;
    cursor: pointer;
    display: block;
    font-weight: bold;
    position: relative;
}

.collapsible-header:after {
    content: '+';
    position: absolute;
    right: 15px;
}

.collapsible-content {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#collapsible-check {
    display: none;
}

#collapsible-check:checked ~ .collapsible-header:after {
    content: '-';
}

#collapsible-check:checked ~ .collapsible-content {
    max-height: 500px;
    padding: 15px;
    border-top: 1px solid #ddd;
}

#preview-container {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

#chart-preview {
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

#chart-preview:hover {
    transform: scale(1.01);
}

/* Loading spinner */
.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

#loading {
    text-align: center;
    padding: 20px;
}

/* Modal styles for fullscreen image view */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border: 2px solid white;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #f1f1f1;
    cursor: pointer;
    font-weight: bold;
    z-index: 1001;
}

/* Modal download button */
.modal-buttons {
    position: absolute;
    bottom: 20px;
    text-align: center;
    width: 100%;
    z-index: 1001;
}

.modal-download-btn {
    background-color: #2196F3;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin: 0 auto;
    display: inline-block;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: background-color 0.3s, transform 0.2s;
}

.modal-download-btn:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
}

/* Download section at the bottom of the preview */
.download-section {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.download-btn {
    background-color: #2196F3;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #0b7dda;
}
