/* Havnso Anparter Frontend Styles - Udvidet version */

/* ===== Dashboard Styles ===== */
.havnso-anpartshaver-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.havnso-welcome {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid #2271b1;
}

.havnso-welcome h2 {
    color: #2271b1;
    margin-top: 0;
}

.havnso-personal-info {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.info-item span {
    color: #212529;
    font-size: 16px;
}

.havnso-anparter-overview {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.havnso-anparter-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.havnso-anparter-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.havnso-anparter-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.havnso-anparter-table tr:hover {
    background-color: #f8f9fa;
}

/* Status badges */
.havnso-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.havnso-status-aktiv {
    background-color: #d1e7dd;
    color: #0f5132;
}

.havnso-status-til_salg {
    background-color: #fff3cd;
    color: #856404;
}

.havnso-status-solgt {
    background-color: #d1ecf1;
    color: #0c5460;
}

.havnso-status-inaktiv {
    background-color: #f8d7da;
    color: #721c24;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover {
    background: #135e96;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.button-small {
    padding: 6px 12px;
    font-size: 13px;
    margin-right: 8px;
}

.button-primary {
    background: #2271b1;
}

.button-primary:hover {
    background: #135e96;
}

/* Badge */
.badge {
    background: #2271b1;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-left: 8px;
}

/* ===== Listing Page Styles ===== */
.havnso-anparter-listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.havnso-anparter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.havnso-anpart-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.havnso-anpart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.anpart-header {
    background: #2271b1;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.anpart-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.price {
    font-size: 1.3em;
    font-weight: bold;
}

.anpart-body {
    padding: 15px;
}

.anpart-body p {
    margin: 10px 0;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: 600;
}

.status-badge.til-salg {
    background: #fff3cd;
    color: #856404;
}

.anpart-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.anpart-footer .button {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.anpart-footer .button:hover {
    background: #135e96;
}

.anpart-footer .button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* ===== Statistics Styles ===== */
.havnso-statistics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2271b1;
}

/* ===== Modal Styles ===== */
.havnso-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.havnso-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 0;
    border-radius: 8px;
    min-width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.havnso-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.havnso-modal-header h2 {
    margin: 0;
    color: #212529;
    font-size: 24px;
}

.havnso-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.havnso-modal-close:hover {
    background: #e9ecef;
    color: #212529;
}

/* Form styles */
.havnso-form-group {
    margin-bottom: 20px;
    padding: 0 30px;
}

.havnso-form-group:first-of-type {
    margin-top: 30px;
}

.havnso-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.havnso-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.havnso-form-control:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

textarea.havnso-form-control {
    min-height: 100px;
    resize: vertical;
}

.havnso-form-actions {
    margin-top: 30px;
    padding: 20px 30px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.description {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* Loading spinner */
.havnso-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .havnso-modal-content {
        min-width: 90%;
        width: 90%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .havnso-anparter-table {
        display: block;
        overflow-x: auto;
    }
    
    .havnso-form-group {
        padding: 0 20px;
    }
    
    .havnso-modal-header {
        padding: 15px 20px;
    }
    
    .havnso-form-actions {
        padding: 15px 20px;
    }
    
    .havnso-statistics-cards {
        grid-template-columns: 1fr;
    }
    
    .havnso-anparter-grid {
        grid-template-columns: 1fr;
    }
}

/* Success/error messages */
.havnso-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.havnso-success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.havnso-error {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.havnso-info {
    background-color: #cff4fc;
    border: 1px solid #b6effb;
    color: #055160;
}

/* Login required */
.havnso-login-required {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 50px auto;
}

.havnso-login-required p {
    margin-bottom: 20px;
    color: #6c757d;
}