/* UHCM Flohmarkt Frontend Styles */

.uhcm-flohmarkt-all,
.uhcm-flohmarkt-my,
.uhcm-flohmarkt-detail {
    font-family: Arial, sans-serif;
}

/* Grid Layout */
.uhcm-flohmarkt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Cards */
.uhcm-flohmarkt-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.uhcm-flohmarkt-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Images */
.uhcm-flohmarkt-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
}

/* Content */
.uhcm-flohmarkt-content {
    padding: 15px;
}

.uhcm-flohmarkt-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.uhcm-flohmarkt-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.5;
}

.uhcm-flohmarkt-price {
    font-size: 24px;
    font-weight: 700;
    color: #FF4500;
    margin: 10px 0;
}

.uhcm-flohmarkt-seller {
    font-size: 13px;
    color: #999;
    margin: 10px 0;
}

/* Status Badge */
.uhcm-flohmarkt-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.uhcm-flohmarkt-status.verfuegbar {
    background: #d4edda;
    color: #155724;
}

.uhcm-flohmarkt-status.verkauft {
    background: #f8d7da;
    color: #721c24;
}

/* Button */
.uhcm-flohmarkt-button {
    display: inline-block;
    padding: 8px 16px;
    background: #FF4500;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: 600;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.uhcm-flohmarkt-button:hover {
    background: #e63e00;
    text-decoration: none;
    color: #fff;
}

/* Filter */
.uhcm-flohmarkt-filter {
    margin-bottom: 20px;
}

.uhcm-flohmarkt-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

/* Contact Form */
.uhcm-contact-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.uhcm-contact-form input,
.uhcm-contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

.uhcm-contact-form input:focus,
.uhcm-contact-form textarea:focus {
    outline: none;
    border-color: #FF4500;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

.uhcm-contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.uhcm-contact-form button {
    background: #FF4500;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
}

.uhcm-contact-form button:hover {
    background: #e63e00;
}

.uhcm-contact-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Auth Container */
.uhcm-auth-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.uhcm-auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
}

.uhcm-auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.3s, border-color 0.3s;
}

.uhcm-auth-tab.active,
.uhcm-auth-tab:hover {
    color: #FF4500;
}

.uhcm-auth-tab.active {
    border-bottom-color: #FF4500;
}

.uhcm-auth-view {
    display: none;
}

.uhcm-auth-view.active {
    display: block;
}

.uhcm-auth-view input[type="text"],
.uhcm-auth-view input[type="email"],
.uhcm-auth-view input[type="password"],
.uhcm-auth-view input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.uhcm-auth-view input:focus {
    outline: none;
    border-color: #FF4500;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

.uhcm-auth-view button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #FF4500;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.uhcm-auth-view button[type="submit"]:hover {
    background: #e63e00;
}

.uhcm-auth-view button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.uhcm-auth-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.uhcm-auth-link a {
    color: #FF4500;
    text-decoration: none;
}

.uhcm-auth-link a:hover {
    text-decoration: underline;
}

.uhcm-msg-success {
    color: #155724;
    background: #d4edda;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
}

.uhcm-msg-error {
    color: #721c24;
    background: #f8d7da;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
}

/* Dashboard Header */
.uhcm-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.uhcm-dashboard-header h2 {
    margin: 0 0 5px;
}

.uhcm-dashboard-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.uhcm-btn-logout {
    background: #666 !important;
    font-size: 13px !important;
    padding: 8px 16px !important;
}

.uhcm-btn-logout:hover {
    background: #555 !important;
}

/* My Articles List */
.uhcm-my-articles-list {
    display: grid;
    gap: 15px;
}

.uhcm-my-article-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
}

.uhcm-my-article-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px 0 0 8px;
}

.uhcm-no-image {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}

.uhcm-my-article-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 5px;
}

.uhcm-btn-sold {
    padding: 4px 10px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.uhcm-btn-sold:hover {
    background: #c82333;
}

.uhcm-btn-available {
    padding: 4px 10px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.uhcm-btn-available:hover {
    background: #218838;
}

.uhcm-btn-sold:disabled,
.uhcm-btn-available:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.uhcm-link-view {
    font-size: 13px;
    color: #FF4500;
    text-decoration: none;
}

.uhcm-link-view:hover {
    text-decoration: underline;
}

.uhcm-empty-state {
    background: #f9f9f9;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
}

.uhcm-empty-state p {
    color: #666;
    margin: 0;
}

/* Article Form */
.uhcm-article-form-wrap {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.uhcm-article-form-wrap h3 {
    margin: 0 0 20px;
}

.uhcm-form-field {
    margin-bottom: 18px;
}

.uhcm-form-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.uhcm-form-field input[type="text"],
.uhcm-form-field input[type="number"],
.uhcm-form-field input[type="email"],
.uhcm-form-field select,
.uhcm-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.uhcm-form-field input:focus,
.uhcm-form-field select:focus,
.uhcm-form-field textarea:focus {
    outline: none;
    border-color: #FF4500;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

.uhcm-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.uhcm-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.uhcm-btn-secondary {
    background: #6c757d !important;
}

.uhcm-btn-secondary:hover {
    background: #5a6268 !important;
}

/* Image Previews */
.uhcm-image-previews {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.uhcm-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
}

.uhcm-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.uhcm-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.uhcm-preview-remove:hover {
    background: #c82333;
}

.uhcm-add-photo-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.3s, color 0.3s;
}

.uhcm-add-photo-btn:hover {
    border-color: #FF4500;
    color: #FF4500;
}

/* Edit/Delete Buttons */
.uhcm-btn-edit {
    padding: 4px 10px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.uhcm-btn-edit:hover {
    background: #0069d9;
}

.uhcm-btn-delete {
    padding: 4px 10px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.uhcm-btn-delete:hover {
    background: #dc3545;
}

.uhcm-btn-edit:disabled,
.uhcm-btn-delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Article Detail (Content Filter) */
.uhcm-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.uhcm-detail-main-img {
    width: 100%;
    border-radius: 8px;
}

.uhcm-detail-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.uhcm-detail-thumb {
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.uhcm-detail-thumb:hover {
    border-color: #FF4500;
}

.uhcm-detail-no-image {
    width: 100%;
    height: 300px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.uhcm-detail-seller-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.uhcm-detail-seller-box h3 {
    margin-top: 0;
}

.uhcm-detail-seller-box p {
    margin: 0;
}

.uhcm-detail-info h3 {
    margin-top: 0;
}

.uhcm-detail-sold-notice {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .uhcm-flohmarkt-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .uhcm-flohmarkt-detail > div {
        grid-template-columns: 1fr !important;
    }

    .uhcm-flohmarkt-image {
        height: 200px;
    }

    .uhcm-auth-container {
        padding: 20px;
    }

    .uhcm-my-article-card {
        grid-template-columns: 1fr !important;
    }

    .uhcm-my-article-image {
        width: 100% !important;
        height: 200px !important;
        border-radius: 8px 8px 0 0 !important;
    }

    .uhcm-dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .uhcm-detail-layout {
        grid-template-columns: 1fr !important;
    }
}
