/**
 * Fotokonkurrence Styles
 */

/* Messages */
.fotok-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.fotok-message.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.fotok-message.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.fotok-message p {
    margin: 0;
}

/* Upload Form */
.fotok-upload-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.fotok-field {
    margin-bottom: 20px;
}

.fotok-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.fotok-field input[type="text"],
.fotok-field input[type="email"],
.fotok-field input[type="tel"],
.fotok-field input[type="file"],
.fotok-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.fotok-field textarea {
    resize: vertical;
}

.fotok-field-note {
    margin: 5px 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.fotok-field.fotok-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
}

.fotok-field.fotok-checkbox input[type="checkbox"] {
    margin-top: 4px;
}

.fotok-submit {
    text-align: center;
    margin-top: 30px;
}

.fotok-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.fotok-btn:hover {
    background: #b71c1c;
}

/* Gallery */
.fotok-gallery {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

.fotok-gallery.fotok-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.fotok-gallery.fotok-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fotok-gallery.fotok-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .fotok-gallery.fotok-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .fotok-gallery.fotok-columns-3,
    .fotok-gallery.fotok-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fotok-gallery {
        grid-template-columns: 1fr;
    }
}

.fotok-photo-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.fotok-photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fotok-photo-image {
    position: relative;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.fotok-photo-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fotok-photo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.fotok-photo-item:hover .fotok-photo-image img {
    transform: scale(1.05);
}

.fotok-photo-info {
    padding: 20px;
}

.fotok-photo-title {
    margin: 0 0 12px;
    font-size: 18px;
    color: #333;
}

.fotok-photo-photographer,
.fotok-photo-location,
.fotok-photo-description,
.fotok-photo-votes {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.fotok-photo-description {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.fotok-photo-votes {
    color: #2271b1;
    font-size: 15px;
}

/* Voting */
.fotok-vote-action {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.fotok-vote-btn {
    width: 100%;
    padding: 10px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.fotok-vote-btn:hover:not(:disabled) {
    background: #135e96;
}

.fotok-vote-btn.voted,
.fotok-vote-btn:disabled {
    background: #50c878;
    cursor: default;
}

.fotok-vote-btn.voting {
    opacity: 0.6;
    cursor: wait;
}

.fotok-login-notice {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 14px;
}

.fotok-login-notice a {
    color: #2271b1;
    text-decoration: none;
    font-weight: bold;
}

.fotok-login-notice a:hover {
    text-decoration: underline;
}

.fotok-no-photos {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Vote notification */
.fotok-vote-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #fff;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.fotok-vote-notification.error {
    border-left-color: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Admin Intro */
.fotok-admin-intro {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.fotok-admin-intro h2 {
    margin-top: 0;
}

.fotok-admin-intro h3 {
    margin-bottom: 10px;
}

.fotok-admin-intro code {
    background: #f0f0f1;
    padding: 3px 6px;
    border-radius: 3px;
}

.fotok-admin-intro ul {
    margin-left: 20px;
}

.fotok-admin-intro li {
    margin: 8px 0;
}
