/* Styles for the Print Template Generator */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

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

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover:not(:disabled) {
    opacity: 0.9;
}

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

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-top: 20px;
}

.preview-section {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    background-color: #fafafa;
    border-radius: 5px;
}

.preview-section h2 {
    margin-top: 0;
    color: #666;
}

#preview {
    max-width: 100%;
    overflow: auto;
    border: 1px solid #ddd;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
}

#preview svg {
    max-width: 100%;
    height: auto;
}

.sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.config-section {
    margin-bottom: 30px;
}

.config-section h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.config-item {
    margin-bottom: 15px;
}

.config-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.config-item input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.config-item input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

#urlList {
    max-height: 400px;
    overflow-y: auto;
}

.url-item {
    margin-bottom: 10px;
    padding: 8px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
}

.url-item strong {
    color: #007bff;
}

.url-item a {
    color: #28a745;
    text-decoration: none;
    word-break: break-all;
}

.url-item a:hover {
    text-decoration: underline;
}

.status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Print styles */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    .container {
        box-shadow: none;
        padding: 0;
        max-width: none;
    }
    
    .controls, .sidebar, h1 {
        display: none;
    }
    
    .content {
        grid-template-columns: 1fr;
        margin: 0;
    }
    
    .preview-section {
        border: none;
        padding: 0;
        background: white;
    }
    
    #preview {
        border: none;
        padding: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 300px;
    }
}
