/**
 * CraftConnect Styles
 */

/* Form Container */
.cc-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cc-form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

/* Forms */
.cc-form {
    width: 100%;
}

.cc-form-group {
    margin-bottom: 15px;
}

.cc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.cc-form-group input[type="text"],
.cc-form-group input[type="email"],
.cc-form-group input[type="password"],
.cc-form-group input[type="tel"],
.cc-form-group input[type="number"],
.cc-form-group input[type="date"],
.cc-form-group input[type="time"],
.cc-form-group select,
.cc-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.cc-form-group input:focus,
.cc-form-group select:focus,
.cc-form-group textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

/* Form Row */
.cc-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.cc-form-row .cc-form-group {
    flex: 1;
    min-width: 150px;
}

/* Buttons */
.cc-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cc-btn-primary {
    background-color: #0073aa;
    color: #fff;
}

.cc-btn-primary:hover {
    background-color: #005a87;
}

.cc-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.cc-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Messages */
.cc-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.cc-message.cc-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cc-message.cc-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cc-message.cc-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Search Container */
.cc-search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.cc-search-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* Search Results */
.cc-search-results {
    margin-top: 30px;
}

.cc-search-results h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Handwerker Cards */
.cc-handwerker-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.cc-handwerker-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.cc-handwerker-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cc-handwerker-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
}

.cc-handwerker-card .cc-branche {
    color: #0073aa;
    font-weight: 600;
    margin-bottom: 8px;
}

.cc-handwerker-card .cc-location {
    color: #666;
    margin-bottom: 5px;
}

.cc-handwerker-card .cc-experience,
.cc-handwerker-card .cc-radius {
    color: #888;
    font-size: 13px;
    margin-bottom: 3px;
}

.cc-handwerker-card .cc-btn {
    margin-top: 15px;
    width: 100%;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    .cc-form-row {
        flex-direction: column;
    }
    
    .cc-form-row .cc-form-group {
        width: 100%;
    }
    
    .cc-handwerker-list {
        grid-template-columns: 1fr;
    }
}

/* Admin Profile Fields */
.form-table .description {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Select2 styling if used */
.select2-container--default .select2-selection--single {
    height: 38px;
    border-color: #ddd;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/**
 * Additional Styles for CraftConnect Features
 * Calendar, Maps, Reviews, Messaging, Dashboard
 */

/* Dashboard */
.cc-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.cc-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cc-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cc-stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
}

.cc-stat-label {
    display: block;
    margin-top: 5px;
    color: #666;
}

.cc-dashboard-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cc-dashboard-section h3 {
    margin-top: 0;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Appointments */
.cc-appointments-list {
    display: grid;
    gap: 15px;
}

.cc-appointment-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background: #fafafa;
}

.cc-appointment-item.cc-status-confirmed {
    border-left: 4px solid #46b450;
}

.cc-appointment-item.cc-status-pending {
    border-left: 4px solid #ffb900;
}

.cc-appointment-item.cc-status-cancelled,
.cc-appointment-item.cc-status-declined {
    border-left: 4px solid #dc3232;
}

.cc-appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cc-appointment-date {
    font-weight: bold;
    color: #333;
}

.cc-appointment-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
}

.cc-appointment-status.status-pending {
    background: #ffb900;
    color: #fff;
}

.cc-appointment-status.status-confirmed {
    background: #46b450;
    color: #fff;
}

.cc-appointment-status.status-completed {
    background: #0073aa;
    color: #fff;
}

.cc-appointment-status.status-cancelled,
.cc-appointment-status.status-declined {
    background: #dc3232;
    color: #fff;
}

.cc-appointment-actions {
    margin-top: 10px;
}

/* Reviews */
.cc-rating-summary {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cc-average-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cc-rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
}

.cc-stars {
    color: #ffb900;
    font-size: 24px;
    margin: 10px 0;
}

.cc-star {
    margin: 0 2px;
}

.cc-star-filled {
    color: #ffb900;
}

.cc-star-empty {
    color: #ddd;
}

.cc-rating-count {
    color: #666;
}

.cc-reviews-list {
    display: grid;
    gap: 15px;
}

.cc-review-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
}

.cc-review-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.cc-review-author {
    font-weight: bold;
}

.cc-review-date {
    color: #666;
    font-size: 14px;
}

/* Star Rating Input */
.cc-star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.cc-star-rating-input input {
    display: none;
}

.cc-star-rating-input label {
    cursor: pointer;
    font-size: 30px;
    color: #ddd;
    margin: 0 2px;
}

.cc-star-rating-input label:hover,
.cc-star-rating-input label:hover ~ label,
.cc-star-rating-input input:checked ~ label {
    color: #ffb900;
}

/* Calendar / Availability */
.cc-availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.cc-availability-day {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background: #fafafa;
}

.cc-availability-day h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.cc-time-slots {
    margin-bottom: 10px;
}

.cc-time-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.cc-time-input {
    width: 100px;
    padding: 5px;
}

.cc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.cc-remove-slot {
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.cc-availability-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Messaging */
.cc-messaging-container {
    max-width: 900px;
    margin: 0 auto;
}

.cc-messaging-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    min-height: 500px;
}

.cc-conversations-list {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow-y: auto;
    max-height: 500px;
}

.cc-conversation-item {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-conversation-item:hover,
.cc-conversation-item.active {
    background: #f0f0f0;
}

.cc-contact-name {
    font-weight: bold;
}

.cc-last-date {
    font-size: 12px;
    color: #666;
}

.cc-unread-count {
    background: #dc3232;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.cc-messages-area {
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.cc-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    max-height: 400px;
}

.cc-message {
    margin-bottom: 15px;
    max-width: 80%;
}

.cc-message-own {
    margin-left: auto;
    text-align: right;
}

.cc-message-other {
    margin-right: auto;
}

.cc-message-content {
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 15px;
    display: inline-block;
}

.cc-message-own .cc-message-content {
    background: #0073aa;
    color: #fff;
}

.cc-message-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.cc-message-form {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.cc-message-form textarea {
    flex: 1;
    min-height: 60px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Profile */
.cc-handwerker-profile {
    max-width: 1000px;
    margin: 0 auto;
}

.cc-profile-header {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.cc-profile-avatar img {
    border-radius: 50%;
}

.cc-profile-title {
    flex: 1;
}

.cc-profile-branche {
    color: #666;
    font-size: 18px;
    margin: 5px 0;
}

.cc-profile-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cc-profile-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.cc-profile-tabs {
    margin-top: 20px;
}

.cc-tabs-nav {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}

.cc-tab-link {
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.cc-tab-link.active,
.cc-tab-link:hover {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.cc-tab-badge {
    background: #dc3232;
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    margin-left: 5px;
}

.cc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.cc-info-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cc-info-label {
    font-weight: bold;
    color: #666;
}

/* Map */
#cc-service-map {
    border-radius: 8px;
    margin: 20px 0;
}

.cc-map-popup h4 {
    margin: 0 0 5px;
}

.cc-map-popup p {
    margin: 3px 0;
}

.cc-center-dot {
    width: 16px;
    height: 16px;
    background: #0073aa;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #0073aa;
}

/* Buttons */
.cc-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.cc-btn:hover {
    background: #005a87;
}

.cc-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.cc-btn-secondary:hover {
    background: #ddd;
}

.cc-btn-success {
    background: #46b450;
}

.cc-btn-success:hover {
    background: #389f42;
}

.cc-btn-danger {
    background: #dc3232;
}

.cc-btn-danger:hover {
    background: #b92a2a;
}

.cc-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Messages */
.cc-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.cc-message-success {
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.cc-message-error {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

.cc-message-info {
    background: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
}

/* Responsive */
@media (max-width: 768px) {
    .cc-messaging-layout {
        grid-template-columns: 1fr;
    }
    
    .cc-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cc-availability-grid {
        grid-template-columns: 1fr;
    }
    
    .cc-dashboard-stats {
        grid-template-columns: 1fr;
    }
}
