/* Üldised stiilid */
.pcp-upload-form {
    max-width: 800px;
    margin: 30px auto;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Pealkiri */
.pcp-upload-form h2 {
    background: rgba(255, 255, 255, 0.95);
    margin: 0;
    padding: 30px;
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    border-bottom: 3px solid #3498db;
}

/* Form gruppide konteiner */
.form-group {
    background: white;
    margin: 0;
    padding: 40px;
    border-radius: 0;
    border: none;
}

.form-group h2 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    align-items: center;
}

.form-group h2:before {
    content: "👤";
    font-size: 20px;
    margin-right: 10px;
}

/* Label stiilid */
.pcp-upload-form label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input väljad */
.pcp-upload-form input[type="text"],
.pcp-upload-form input[type="email"],
.pcp-upload-form input[type="tel"],
.pcp-upload-form input[type="number"],
.pcp-upload-form input[type="file"],
.pcp-upload-form select,
.pcp-upload-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.pcp-upload-form input:focus,
.pcp-upload-form select:focus,
.pcp-upload-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

/* Select dropdown */
.pcp-upload-form select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    appearance: none;
}

/* Foto sektsioon */
.photo-entry {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    margin: 30px 0;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.photo-entry h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
}

.photo-entry h3:before {
    content: "📸";
    font-size: 18px;
    margin-right: 10px;
}

/* File input stiilid */
.pcp-upload-form input[type="file"] {
    padding: 20px;
    border: 2px dashed #3498db;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pcp-upload-form input[type="file"]:hover {
    border-color: #2980b9;
    background: #e3f2fd;
}

/* Kirjeldused */
.description {
    font-size: 13px;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 5px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #3498db;
}

/* Kategooriate konteiner */
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.category-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 15px 0 0;
    accent-color: #3498db;
    cursor: pointer;
    transform: scale(1.2);
}

.category-item input[type="checkbox"]:checked + .category-content {
    color: #2c3e50;
    font-weight: 600;
}

.category-item input[type="checkbox"]:checked {
    transform: scale(1.3);
}

.category-content {
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
}

.category-icon {
    font-size: 24px;
    margin-right: 12px;
    width: 30px;
    text-align: center;
}

.category-item label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
    padding: 0;
    text-transform: none;
    letter-spacing: normal;
    color: #34495e;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

/* Kategooriate spetsiifilised värvid */
.category-item[data-category="elva"] {
    border-left: 4px solid #27ae60;
}

.category-item[data-category="animal"] {
    border-left: 4px solid #e67e22;
}

.category-item[data-category="mushroom"] {
    border-left: 4px solid #8e44ad;
}

.category-item[data-category="plant"] {
    border-left: 4px solid #2ecc71;
}

.category-item[data-category="winter"] {
    border-left: 4px solid #3498db;
}

.category-item[data-category="vvv"] {
    border-left: 4px solid #f39c12;
}

.category-item[data-category="gauja"] {
    border-left: 4px solid #16a085;
}

.category-item[data-category="other"] {
    border-left: 4px solid #95a5a6;
}

/* Valitud kategooriate stiil */
.category-item:has(input:checked) {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4edda 100%);
    border-color: #3498db;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.15);
}

/* Kategooriate pealkiri */
.categories-title {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.categories-title:before {
    content: "🏷️";
    margin-right: 8px;
    font-size: 18px;
}
/* Nupud */
.button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin: 10px 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

/* Lisa foto nupp */
#add-photo-button {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    margin: 30px auto;
    display: block;
    padding: 18px 35px;
    font-size: 17px;
}

#add-photo-button:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

#add-photo-button:before {
    content: "➕ ";
    margin-right: 8px;
}

/* Eemalda foto nupp */
.remove-photo-button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.remove-photo-button:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.remove-photo-button:before {
    content: "🗑️ ";
    margin-right: 5px;
}

/* Esitamise sektsioon */
.form-actions {
    text-align: center;
    margin-top: 0;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

.submit-button {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
    padding: 20px 50px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(142, 68, 173, 0.3);
}

.submit-button:hover {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.4);
}

.submit-button:before {
    content: "🏆 ";
    margin-right: 10px;
}

/* Laadimisikoon */
#loading-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loading-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-content p {
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}

/* Popup stiilid */
#pcp-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.pcp-popup {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-inner {
    padding: 40px;
}

.pcp-close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(231, 76, 60, 0.1);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #e74c3c;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pcp-close-button:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

/* Teadete stiilid */
#submission-status-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 20px;
    margin: 30px auto;
    text-align: center;
    display: none;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsiivne disain */
@media (max-width: 768px) {
    .pcp-upload-form {
        margin: 20px 10px;
        border-radius: 10px;
    }
    
    .form-group {
        padding: 25px 20px;
    }
    
    .photo-entry {
        padding: 20px;
    }
    
    .popup-inner {
        padding: 25px 20px;
    }
    
    .categories-container {
        grid-template-columns: 1fr;
    }
    
    .submit-button {
        padding: 18px 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .pcp-upload-form h2 {
        font-size: 24px;
        padding: 25px 20px;
    }
    
    .form-group h2 {
        font-size: 20px;
    }
    
    .pcp-upload-form input,
    .pcp-upload-form select,
    .pcp-upload-form textarea {
        padding: 12px;
        font-size: 16px;
    }
}

/* Animatsioonid */
.photo-entry {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover efektid */
.pcp-upload-form input:hover:not(:focus),
.pcp-upload-form select:hover:not(:focus),
.pcp-upload-form textarea:hover:not(:focus) {
    border-color: #bdc3c7;
}

/* Progress bar */
.progress-bar-container {
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    height: 8px;
    transition: width 0.3s ease;
}