/* Admin Page Styles */

.admin-section {
    padding: 120px 0 60px;
    min-height: calc(100vh - 200px);
    background-color: var(--background);
}

.admin-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.settings-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 0 auto;
}

.settings-title {
    font-family: 'PT Serif', serif;
    font-size: 1.5rem;
    color: var(--navy-blue-primary);
    margin-bottom: 0.5rem;
}

.settings-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.settings-group {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-blue-primary);
    margin-bottom: 0.25rem;
}

.setting-info p {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px #4CAF50;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.settings-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

/* Settings Message */
.settings-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-align: center;
    display: none;
}

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

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

/* Form Unavailable Message */
.form-unavailable {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-unavailable p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Login Card */
.login-card {
    max-width: 400px;
}

.login-card .form-group {
    margin-bottom: 1rem;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--navy-blue-primary);
}

.login-card .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.login-card .form-group input:focus {
    outline: none;
    border-color: var(--navy-blue-primary);
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Admin Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.admin-header .page-title {
    margin-bottom: 0;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.photo-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.photo-preview {
    position: relative;
    height: 150px;
    cursor: pointer;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-preview:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 47, 76, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-preview:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay span {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.photo-info {
    padding: 1rem;
}

.photo-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    color: var(--navy-blue-primary);
}

.photo-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
}

/* Message info type */
.settings-message.info {
    display: block;
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Content Editor */
.content-editor {
    margin-top: 1.5rem;
}

.editor-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #eee;
}

.editor-section-title {
    font-size: 1.1rem;
    color: var(--navy-blue-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold-accent);
}

.editor-field {
    margin-bottom: 1rem;
}

.editor-field:last-child {
    margin-bottom: 0;
}

.editor-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.editor-field input,
.editor-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.editor-field input:focus,
.editor-field textarea:focus {
    outline: none;
    border-color: var(--navy-blue-primary);
}

.editor-field textarea {
    resize: vertical;
    min-height: 80px;
}

.editor-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .settings-actions {
        flex-direction: column;
    }

    .settings-actions .btn {
        width: 100%;
        text-align: center;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

