/* GRT Ticket Admin - Settings Page Styles */

.grt-settings-form {
    background: #fff;
    padding: 20px;
    max-width: 1620px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border: 1px solid #ccd0d4;
    border-top: 0;
}

.grt-settings-tabs {
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

.grt-tab-content {
    display: none;
}

.grt-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.grt-settings-section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.grt-settings-section-header h2 {
    margin-top: 0;
    font-size: 1.4em;
    color: #23282d;
}

.grt-settings-form table {
    width: 100%;
}

.grt-settings-form th {
    width: 220px;
    text-align: left;
    padding: 20px 10px 20px 0;
    vertical-align: top;
    font-weight: 600;
}

.grt-settings-form td {
    padding: 20px 0;
}

.grt-settings-form input[type="text"],
.grt-settings-form input[type="password"],
.grt-settings-form input[type="number"],
.grt-settings-form textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.grt-settings-form input:focus,
.grt-settings-form textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.grt-settings-form textarea {
    height: 120px;
}

.grt-settings-form .description {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Category Image Upload */
.grt-category-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: background 0.2s;
}

.grt-category-item:hover {
    background: #f0f0f1;
}

.grt-image-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grt-image-preview {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.grt-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Switch Toggle */
.grt-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2271b1;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2271b1;
}

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

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Scoped Tab Styles */
.grt-settings-tabs {
    border-bottom: 1px solid #c3c4c7;
    padding-top: 10px;
}

.grt-settings-tabs .nav-tab {
    background: #e5e5e5;
    color: #555;
    border: 1px solid #c3c4c7;
    border-bottom: none;
    margin-right: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    opacity: 0.9;
}

.grt-settings-tabs .nav-tab:hover {
    background: #f0f0f1;
    color: #000;
    opacity: 1;
}

.grt-settings-tabs .nav-tab-active,
.grt-settings-tabs .nav-tab-active:hover {
    background: #fff;
    border-bottom: 1px solid #fff;
    color: #000;
    font-weight: 600;
    opacity: 1;
    margin-bottom: -1px;
}

/* Scoped Button Styles */
.grt-settings-form .button {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #2271b1;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
    transition: all 0.2s ease;
}

.grt-settings-form .button:hover {
    background: #f0f0f1;
    border-color: #0a4b78;
    color: #0a4b78;
}

.grt-settings-form .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    text-shadow: none;
    box-shadow: none;
}

.grt-settings-form .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Scoped Link Styles */
.grt-settings-form a:not(.button) {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.1s ease-in-out;
}

.grt-settings-form a:not(.button):hover {
    color: #135e96;
}

.grt-settings-form a:not(.button):focus {
    box-shadow: 0 0 0 2px #2271b1;
    outline: 2px solid transparent;
}

.grt-is-hidden {
    display: none;
}

.grt-result-error {
    color: #d63638;
}

.grt-result-success {
    color: #1d8f4e;
}
