/* Grundläggande stilar */
body {
    font-family: Arial, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

/* Container stilar */
.container {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.example-container {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Tabellstilar för 17 kolumner */
.full-width-table {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 15px; /* Plats för scrollbar */
}

.kontering-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
    white-space: nowrap;
}

.kontering-table th, 
.kontering-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    min-width: 80px;
}

.kontering-table th {
    background-color: #4CAF50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.kontering-table .empty-column {
    background-color: #f5f5f5;
    color: #999;
    font-style: italic;
}

.kontering-table th.empty-column {
    background-color: #90a4ae;
}

.kontering-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.kontering-table tr:hover td:not(.empty-column) {
    background-color: #e8f5e9;
}

/* Kolumnlista i informationsrutan */
.column-list {
    columns: 2;
    list-style-position: inside;
    padding-left: 0;
}

.column-list li {
    margin-bottom: 5px;
    break-inside: avoid;
}

/* Formulärstilar */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-column {
    flex: 1;
}

/* Period-sektion */
.period-section {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #90caf9;
    margin-bottom: 20px;
}

.period-section input {
    font-family: monospace;
    letter-spacing: 1px;
    font-size: 16px;
}

.period-section input:invalid {
    border-color: #f44336;
    background-color: #ffebee;
}

/* Input och Select stilar */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c5282;
}

input[type="text"], 
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Aktivitetssektion */
.activity-section {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
}

.activity-section:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cost-section {
    border: 2px solid #4CAF50;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* Knappstilar */
button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

button.calculate-monthly {
    background-color: #2196F3;
    font-weight: bold;
    font-size: 1.1em;
    margin: 20px 0;
    display: block;
    width: 100%;
}

button.calculate-monthly:hover {
    background-color: #1976D2;
}

/* Informationsruta */
.info-box {
    background-color: #e7f3fe;
    border: 1px solid #b6d4fd;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #084298;
}

.info-box h3 {
    margin-top: 0;
    color: #084298;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

/* Belopphantering */
.yearly-monthly-container {
    display: flex;
    gap: 15px;
}

.yearly-monthly-container > div {
    flex: 1;
}

.monthly-amount {
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #a5d6a7;
}

.monthly-amount label {
    color: #2e7d32;
}

/* Hjälptext */
.help-text {
    color: #666;
    font-size: 0.9em;
    margin-top: 4px;
    display: block;
}

/* Återställningsknapp */
.reset-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.reset-button:hover {
    transform: scale(1.1) rotate(180deg);
    background-color: #45a049;
}

.reset-icon {
    font-size: 24px;
    line-height: 1;
}

/* Responsiv design */
@media (max-width: 768px) {
    .yearly-monthly-container {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .column-list {
        columns: 1;
    }
    
    .container {
        padding: 10px;
    }
    
    .reset-button {
        bottom: 10px;
        right: 10px;
    }
}

/* Animationer */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.contract-item {
    animation: fadeIn 0.5s ease;
}

/* Felmeddelanden */
.error-message {
    color: #f44336;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

/* Scrollbar stilar för bättre synlighet vid tabellscrollning */
.full-width-table::-webkit-scrollbar {
    height: 12px;
}

.full-width-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.full-width-table::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.full-width-table::-webkit-scrollbar-thumb:hover {
    background: #555;
}