/**
 * Community Camp Submissions - Frontend Styles
 */

/* Form Styles */
.ccs-submission-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ccs-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ccs-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.ccs-form-section:last-child {
    border-bottom: none;
}

.ccs-form-section h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d0992e;
}

.ccs-form-row {
    margin-bottom: 20px;
}

.ccs-form-row label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.ccs-form-row label .required {
    color: #d32f2f;
}

.ccs-form-row input[type="text"],
.ccs-form-row input[type="email"],
.ccs-form-row input[type="tel"],
.ccs-form-row input[type="url"],
.ccs-form-row input[type="date"],
.ccs-form-row input[type="time"],
.ccs-form-row input[type="file"],
.ccs-form-row select,
.ccs-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.ccs-form-row input:focus,
.ccs-form-row select:focus,
.ccs-form-row textarea:focus {
    outline: none;
    border-color: #d0992e;
    box-shadow: 0 0 0 2px rgba(208,153,46,0.1);
}

.ccs-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ccs-help-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.ccs-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.ccs-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
}

.ccs-submit-button {
    background: #d0992e;
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.ccs-submit-button:hover {
    background: #b8872a;
}

.ccs-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Message Styles */
.ccs-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: center;
}

.ccs-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ccs-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Camps Display Styles */
.ccs-camps-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters */
.ccs-filters {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.ccs-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.ccs-filter-item {
    flex: 1;
    min-width: 150px;
}

.ccs-filter-item label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.ccs-filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.ccs-filter-reset {
    background: #666;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.ccs-filter-reset:hover {
    background: #555;
}

/* Camps Grid */
.ccs-camps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Camp Card Link */
.ccs-camp-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.ccs-camp-card-link:hover {
    text-decoration: none;
}

/* Camp Card */
.ccs-camp-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ccs-camp-card-link:hover .ccs-camp-card {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.ccs-camp-card-link:hover .ccs-camp-featured {
    border-color: #e6a833;
}

.ccs-camp-card.ccs-camp-finished {
    opacity: 0.7;
}

.ccs-camp-card.ccs-camp-featured {
    border: 2px solid #d0992e;
}

.ccs-camp-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Badge positioning - only status badges now */

.ccs-badge-upcoming {
    background: #2196F3;
    color: white;
}

.ccs-badge-active {
    background: #4CAF50;
    color: white;
}

.ccs-badge-finished {
    background: #9E9E9E;
    color: white;
}

.ccs-camp-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.ccs-camp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ccs-camp-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ccs-camp-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.ccs-camp-organizer {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.ccs-camp-meta {
    margin: 15px 0;
}

.ccs-meta-item {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    word-wrap: break-word;
}

.ccs-meta-icon {
    margin-right: 8px;
    font-size: 16px;
}

.ccs-meta-cost {
    color: #d0992e;
    font-weight: 600;
}

.ccs-camp-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: auto;
    max-height: none;
    overflow: visible;
}

/* Ensure excerpt doesn't get cut off */
.ccs-camp-description p {
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: visible;
    text-overflow: clip;
}

.ccs-camp-actions {
    margin-top: 20px;
}

/* Camp Title Links */
.ccs-camp-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.ccs-camp-link:hover {
    color: #d0992e;
}

/* Details Button */
.ccs-details-button {
    display: inline-block;
    background: #333;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
    margin-right: 10px;
}

.ccs-details-button:hover {
    background: #555;
    color: white;
}

.ccs-register-button,
.ccs-pdf-button {
    display: inline-block;
    background: #d0992e;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
    margin-right: 10px;
    margin-top: 5px;
}

.ccs-pdf-button {
    background: #6c757d;
}

.ccs-register-button:hover {
    background: #b8872a;
    color: white;
}

.ccs-pdf-button:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

/* Session display styles */
.ccs-camp-sessions {
    margin: 15px 0;
}

.ccs-session-info {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 3px solid #d0992e;
    overflow: hidden;
}

.ccs-session-info strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.05em;
}

.ccs-session-details {
    display: block;
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
}

.ccs-session-details span {
    display: block;
    margin-bottom: 5px;
    white-space: normal;
    word-wrap: break-word;
}

.ccs-session-details strong {
    display: inline;
    margin: 0;
    font-size: 1em;
    margin-right: 5px;
}

/* No Camps Message */
.ccs-no-camps {
    text-align: center;
    padding: 60px 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.ccs-no-camps p {
    font-size: 18px;
    color: #666;
}

/* Loading State */
.ccs-loading {
    text-align: center;
    padding: 40px;
}

.ccs-loading:after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d0992e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ccs-form-row-half {
        grid-template-columns: 1fr;
    }
    
    .ccs-filter-row {
        flex-direction: column;
    }
    
    .ccs-filter-item {
        width: 100%;
    }
    
    .ccs-camps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ccs-submission-form-wrapper {
        padding: 10px;
    }
    
    .ccs-form {
        padding: 20px;
    }
    
    /* Better card layout on mobile */
    .ccs-camp-card {
        position: relative;
    }
    
    .ccs-camp-content {
        padding: 15px;
    }
    
    .ccs-camp-title {
        font-size: 18px;
        line-height: 1.3;
    }
    
    /* Smaller badges on mobile */
    .ccs-camp-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* Session info better on mobile */
    .ccs-session-info {
        padding: 10px;
    }
    
    .ccs-session-details {
        font-size: 0.9em;
    }
    
    .ccs-session-details span {
        margin-bottom: 3px;
    }
    
    /* Buttons stack on mobile */
    .ccs-camp-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .ccs-register-button,
    .ccs-pdf-button {
        width: 100%;
        text-align: center;
        margin: 0;
    }
}