/**
 * LittleLoft Reklamacje - Frontend Styles
 */

.littleloft-reklamation-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.littleloft-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Form intro */
.form-intro {
    margin-bottom: 25px;
    text-align: center;
}

.form-intro h2 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 24px;
}

.form-intro p {
    margin: 0;
    color: #646970;
    font-size: 14px;
    line-height: 1.6;
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.form-group label .required {
    color: #dc3232;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0a0a0;
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

/* File upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-area {
    position: relative;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #2271b1;
    background-color: #f8fbff;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.upload-text {
    display: block;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 5px;
}

.upload-hint {
    display: block;
    font-size: 12px;
    color: #888;
}

/* File preview */
.file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.file-preview:empty {
    display: none;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.preview-item .remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    transition: background-color 0.2s;
}

.preview-item .remove-file:hover {
    background: #dc3232;
}

.preview-item .file-name {
    padding: 5px 8px;
    font-size: 11px;
    color: #646970;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Honeypot - hidden from humans */
.ll-website-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Submit button */
.form-submit {
    margin-top: 25px;
}

.submit-button {
    width: 100%;
    padding: 14px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.submit-button:hover {
    background: #135e96;
}

.submit-button:active {
    transform: scale(0.98);
}

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

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form message */
.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
}

.form-message.error {
    background: #fef0f0;
    color: #b32d2e;
    border: 1px solid #f5c6c6;
}

.form-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Privacy note */
.form-privacy {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-privacy p {
    margin: 0;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* Success state */
.form-success {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #00a32a;
    color: #fff;
    border-radius: 50%;
    font-size: 32px;
    line-height: 60px;
    margin: 0 auto 20px;
}

.form-success h3 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 24px;
}

.form-success p {
    margin: 0 0 10px 0;
    color: #646970;
    font-size: 15px;
    line-height: 1.6;
}

.form-success #reklamation-id {
    color: #2271b1;
    font-size: 18px;
}

.form-success .submit-button {
    margin-top: 25px;
    width: auto;
    padding: 12px 30px;
}

/* Responsive */
@media (max-width: 600px) {
    .littleloft-form,
    .form-success {
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }

    .form-intro h2 {
        font-size: 20px;
    }

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