﻿.gallery-form-page {
    min-height: 100vh;
    padding: 42px 15px;
    background: #f4f5f7;
    font-family: Arial, sans-serif;
}

.gallery-form-card {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 34px 42px;
    border: 1px solid #d0d0d0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.gallery-form-title {
    margin: 0 0 30px;
    color: #2f5597;
    text-align: center;
    font-size: 30px;
    font-weight: 800;
}

.gallery-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 28px;
}

.gallery-field {
    min-width: 0;
}

.gallery-field-full {
    grid-column: 1 / -1;
}

.gallery-field label,
.gallery-photo-label {
    display: block;
    margin-bottom: 7px;
    color: #173f8f;
    font-size: 16px;
    font-weight: 600;
}

.gallery-required {
    color: #d62828;
}

.gallery-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #b8bec8;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.gallery-field .k-widget,
.gallery-field .k-textbox,
.gallery-field .k-dropdown,
.gallery-field .k-upload {
    box-sizing: border-box;
    width: 100%;
}

.gallery-field .k-upload {
    border-radius: 5px;
}

.gallery-control:focus {
    border-color: #2f5597;
    box-shadow: 0 0 0 3px rgba(47, 85, 151, .14);
}

textarea.gallery-control {
    min-height: 105px;
    resize: vertical;
}

.gallery-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 28px;
    align-items: start;
}

.gallery-file-control {
    padding: 8px;
}

.gallery-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 160px;
    overflow: hidden;
    border: 2px dashed #c6c6c6;
    background: #f6f6f6;
    color: #666;
    text-align: center;
    font-weight: 700;
}

    .gallery-preview img {
        display: none;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.gallery-validation-summary {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-left: 4px solid #d62828;
    background: #fff0f0;
    color: #a11818;
}

    .gallery-validation-summary:empty,
    .gallery-validation-summary.validation-summary-valid {
        display: none;
    }

.field-validation-error {
    display: block;
    margin-top: 5px;
    color: #c62020;
    font-size: 13px;
}

.gallery-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.gallery-button {
    min-width: 130px;
    padding: 11px 24px;
    border-radius: 7px;
    background: #ef6c28;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

    .gallery-button:hover,
    .gallery-button:focus {
        background: #d95818;
        color: #fff;
        text-decoration: none;
        transform: translateY(-2px);
    }

@media (max-width: 700px) {
    .gallery-form-page {
        padding: 20px 12px;
    }

    .gallery-form-card {
        padding: 25px 18px;
    }

    .gallery-form-title {
        font-size: 24px;
    }

    .gallery-form-grid,
    .gallery-upload-row {
        grid-template-columns: 1fr;
    }

    .gallery-preview {
        width: 100%;
        max-width: 320px;
        height: 210px;
        margin: 0 auto;
    }

    .gallery-actions {
        flex-direction: column;
    }

    .gallery-button {
        width: 100%;
    }
}