/* GRT Ticket Public Styles */

/* Full-Screen Container */
.grt-ticket-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.grt-ticket-inner {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

.grt-ticket-header {
    text-align: center;
    margin-bottom: 30px;
}

.grt-ticket-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

.grt-ticket-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Dropdown Selector */
.grt-category-selector {
    margin-bottom: 30px;
}

.grt-category-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

/* Custom Dropdown */
.grt-custom-dropdown {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.grt-dropdown-selected {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.grt-dropdown-selected:hover {
    border-color: #94a3b8;
}

.grt-dropdown-selected.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.grt-selected-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grt-dropdown-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
}

.grt-dropdown-selected.active .grt-dropdown-arrow {
    transform: rotate(180deg);
}

.grt-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    margin-top: 6px;
}

.grt-dropdown-options.show {
    display: block;
}

.grt-dropdown-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

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

.grt-dropdown-item:hover {
    background: #f8fafc;
}

.grt-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.grt-item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.grt-item-icon-placeholder {
    width: 28px;
    height: 28px;
    background: #e0e0e0;
    color: #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.grt-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Ticket Form */
.grt-ticket-form {
    display: none;
}

.grt-ticket-form.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grt-form-group {
    margin-bottom: 20px;
}

.grt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f172a;
    font-size: 13px;
}

.grt-form-group input,
.grt-form-group textarea,
.grt-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.grt-form-group input:focus,
.grt-form-group textarea:focus,
.grt-form-group select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

.grt-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.grt-form-group.required label::after {
    content: ' *';
    color: #e74c3c;
}

.grt-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.grt-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.grt-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.grt-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Chat Interface */
.grt-chat-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f0f0f1;
    z-index: 9999;
    display: flex;
    box-sizing: border-box;
}

.grt-chat-container * {
    box-sizing: border-box;
}

.grt-chat-sidebar {
    width: 300px;
    background: #fff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.grt-chat-sidebar-header {
    padding: 20px;
    background: #667eea;
    color: #fff;
}

.grt-chat-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.grt-chat-tickets-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.grt-chat-ticket-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
    display: block;
    color: inherit;
}

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

.grt-chat-ticket-item.active {
    background: #e8f4f8;
    border-left-color: #667eea;
}

.grt-chat-ticket-item h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
}

.grt-chat-ticket-item p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.grt-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.grt-chat-header {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.grt-chat-header h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
}

.grt-chat-header p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.grt-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
}

.grt-chat-message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.grt-chat-message.admin {
    align-items: flex-start;
}

.grt-chat-message.user {
    align-items: flex-end;
}

.grt-message-sender {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #666;
}

.grt-message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.grt-chat-message.admin .grt-message-bubble {
    background: #667eea;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.grt-chat-message.user .grt-message-bubble {
    background: #fff;
    color: #23282d;
    border: 1px solid #ddd;
    border-bottom-right-radius: 4px;
}

.grt-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.grt-chat-input-container {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.grt-chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.grt-chat-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    resize: vertical;
    min-height: 40px;
    max-height: 150px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.grt-chat-input:focus {
    outline: none;
    border-color: #667eea;
}

.grt-chat-input:disabled {
    background: #f0f0f1;
    cursor: not-allowed;
}

.grt-chat-send-btn {
    padding: 12px 24px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.grt-chat-send-btn:hover {
    background: #5568d3;
}

.grt-chat-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.grt-chat-solved-notice {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    text-align: center;
    font-weight: 600;
    border-top: 1px solid #c3e6cb;
}

.grt-ticket-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.grt-ticket-status.status-open {
    background: #d4edda;
    color: #155724;
}

.grt-ticket-status.status-solved {
    background: #cce5ff;
    color: #004085;
}

.grt-ticket-status.status-closed {
    background: #f8d7da;
    color: #721c24;
}

/* Switch Styles */
.grt-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.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;
    -webkit-transition: .4s;
    transition: .4s;
}

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

input:checked + .slider {
    background-color: #667eea;
}

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

input:checked + .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

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

/* Notification Settings */
.grt-profile-notifications {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.grt-profile-notifications h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.grt-notification-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.grt-notification-toggle label:first-child {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .grt-ticket-inner {
        padding: 30px 20px;
    }

    .grt-chat-sidebar {
        width: 250px;
    }

    .grt-message-bubble {
        max-width: 85%;
    }
}

@media screen and (max-width: 600px) {
    .grt-chat-sidebar {
        display: none;
    }

    .grt-message-bubble {
        max-width: 95%;
    }

    .grt-chat-input-wrapper {
        flex-direction: column;
    }

    .grt-chat-send-btn {
        width: 100%;
    }
}
