/**
 * GoldPreisData Ankaufsrechner - Stylesheet v1.0.0
 */

.goldpreisdata-ankaufsrechner {
    max-width: 740px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gpdc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.gpdc-title {
    margin: 0;
    font-size: 1.4em;
    color: #1a1a1a;
}

.gpdc-currency {
    font-size: 1.1em;
    font-weight: bold;
    color: #666;
}

.gpdc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gpdc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gpdc-checkbox-field {
    flex-direction: row;
    align-items: center;
}

.gpdc-field label {
    font-size: 0.9em;
    font-weight: 500;
    color: #555;
}

.gpdc-select,
.gpdc-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    background-color: #fff;
}

.gpdc-select:focus,
.gpdc-input:focus {
    outline: 2px solid #007cba;
    outline-offset: -1px;
    border-color: #007cba;
}

.gpdc-input {
    width: 100%;
    box-sizing: border-box;
}

.gpdc-btn-calculate {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.gpdc-btn-calculate:hover {
    background-color: #005a87;
}

.gpdc-btn-calculate:active {
    transform: translateY(1px);
}

.gpdc-result {
    margin-top: 20px;
    padding: 16px;
    background-color: #e8f4e8;
    border: 1px solid #b2d8b2;
    border-radius: 6px;
    text-align: center;
}

.gpdc-result-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gpdc-result-label {
    font-size: 0.85em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gpdc-result-value {
    font-size: 2em;
    font-weight: bold;
    color: #1a7d1a;
}

.gpdc-result-currency {
    font-size: 1.1em;
    color: #666;
}

.gpdc-spot-rate {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

.gpdc-last-updated {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}

.gpdc-error {
    margin-top: 16px;
    padding: 12px;
    background-color: #fce8e8;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    text-align: center;
    display: none;
}

/* Single-item calculator - smaller width */
.goldpreisdata-ankaufsrechner:not(.goldpreisdata-ankaufsrechner-multi) {
    max-width: 400px;
}

/* Multi-item calculator styles */
.goldpreisdata-ankaufsrechner-multi .gpdc-multi-form {
    margin-bottom: 20px;
}

.gpdc-multi-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    align-items: end;
}

.gpdc-multi-form-row .gpdc-field {
    margin-bottom: 0;
}

.gpdc-field-button {
    grid-column: 1 / -1;
}

.gpdc-btn-add-item {
    background-color: #28a745;
    width: 100%;
}

.gpdc-btn-add-item:hover {
    background-color: #218838;
}

.gpdc-multi-table-container {
    margin-bottom: 20px;
    overflow-x: auto;
}

.gpdc-multi-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    table-layout: fixed;
}

.gpdc-multi-table th,
.gpdc-multi-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.gpdc-multi-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    color: #555;
    white-space: nowrap;
}

.gpdc-multi-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Column widths - use min-width in characters for natural sizing */
.gpdc-multi-table td:nth-child(1),
.gpdc-multi-table th:nth-child(1) {
    min-width: 8ch;
}

.gpdc-multi-table td:nth-child(2),
.gpdc-multi-table th:nth-child(2) {
    min-width: 8ch;
}

.gpdc-multi-table td:nth-child(3),
.gpdc-multi-table th:nth-child(3) {
    min-width: 12ch;
}

.gpdc-multi-table td:nth-child(4),
.gpdc-multi-table th:nth-child(4) {
    width: 3ch;
    min-width: 3ch;
    text-align: center;
}

.gpdc-col-value {
    font-weight: bold;
    color: #1a7d1a;
    min-width: 10ch;
    white-space: nowrap;
    text-align: right;
}

.gpdc-col-remove {
    width: 45px;
    min-width: 45px;
    text-align: center;
    white-space: nowrap;
}

.gpdc-multi-remove {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    background-color: #f0f0f0;
    border-radius: 50%;
    color: #999;
    text-decoration: none;
    font-size: 20px;
}

.gpdc-multi-remove:hover {
    background-color: #e0e0e0;
    color: #666;
}

.gpdc-summary-row {
    font-weight: bold;
}

.gpdc-summary-label {
    text-align: right;
}

.gpdc-summary-value {
    color: #1a7d1a;
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 600px) {
    .goldpreisdata-ankaufsrechner {
        padding: 15px;
        margin: 10px;
    }

    .gpdc-result-value {
        font-size: 1.6em;
    }

    .gpdc-multi-form-row {
        grid-template-columns: 1fr;
    }

    .gpdc-multi-table {
        font-size: 0.85em;
    }

    .gpdc-multi-table th,
    .gpdc-multi-table td {
        padding: 6px 8px;
    }
}
