/* Nightscout Data Exporter Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.byline {
    margin-top: 15px;
    opacity: 0.8;
}

.byline a {
    color: #fff;
    text-decoration: underline;
}

main {
    padding: 30px;
}

section {
    margin-bottom: 30px;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

small {
    display: block;
    color: #888;
    margin-top: 5px;
    font-size: 0.85em;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-cta {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
}

.btn-cta:hover {
    background: #218838;
}

.status-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.status-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
}

.status-message.loading {
    background: #cce5ff;
    color: #004085;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    width: 0%;
}

.preview-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

#data-preview {
    overflow-x: auto;
}

#data-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

#data-preview th,
#data-preview td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#data-preview th {
    background: #667eea;
    color: white;
}

#data-preview tr:hover {
    background: #f5f5f5;
}

.preview-note {
    text-align: center;
    color: #888;
    margin-top: 15px;
    font-size: 0.9em;
}

.info-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.info-section ul {
    list-style: none;
    margin-bottom: 30px;
}

.info-section li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.info-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.mieru-promo {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.mieru-promo h3 {
    color: #667eea;
    margin-bottom: 10px;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 20px;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}

/* Checkbox Styles */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #444;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}
