/* Askany Admin Styles
 * Askany WordPress plugin
 */

:root {
    --askany-primary: #4361ee;
    --askany-primary-dark: #3a56d4;
    --askany-secondary: #f72585;
    --askany-tertiary: #7209b7;
    --askany-success: #06d6a0;
    --askany-warning: #ffd166;
    --askany-danger: #ef476f;
    --askany-light: #f8f9fa;
    --askany-dark: #212529;
    --askany-gray: #6c757d;
    --askany-gray-light: #e9ecef;
    --askany-border-radius: 8px;
    --askany-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --askany-transition: all 0.3s ease;
}


/* Scrollbar width */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Track (background) */
::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* Handle (thumb) */
::-webkit-scrollbar-thumb {
    background: #ceccfc;
    /* change color */
    border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #ceccfc;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #ceccfc #f1f1f1;
}



/* Global Styles */
.wrap.askany-qa-management,
.wrap {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wrap h1 {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--askany-gray-light);
    color: var(--askany-dark);
    font-size: 26px;
    font-weight: 600;
}

.wrap h1::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-color: var(--askany-primary);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

/* Card Component */
.card {
    background-color: white;
    border-radius: var(--askany-border-radius);
    box-shadow: var(--askany-box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: var(--askany-transition);
    min-width: none;
    max-width: none;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.05);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--askany-dark);
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Stats Boxes */
.askany-admin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.askany-stat-box {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(to right, rgba(67, 97, 238, 0.05), rgba(114, 9, 183, 0.05));
    border-radius: var(--askany-border-radius);
    padding: 1.5rem;
    box-shadow: var(--askany-box-shadow);
    transition: var(--askany-transition);
}

.askany-stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.askany-stat-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 18px;
    color: var(--askany-primary);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--askany-gray-light);
}

.askany-stat-box p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.askany-stat-box strong {
    background-color: var(--askany-light);
    border-radius: 20px;
    padding: 2px 12px;
    color: var(--askany-primary);
    font-weight: 600;
    transition: var(--askany-transition);
}

.askany-stat-box:hover strong {
    background-color: var(--askany-primary);
    color: white;
}


.api-keys-url span {
    display: inline-block;
    background-color: var(--askany-gray-light);
    padding: 6px 12px;
    border-radius: var(--askany-border-radius);
    margin: 5px 0;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition: var(--askany-transition);
}

.api-keys-url span:hover {
    background-color: var(--askany-primary);
    color: white;
}

.api-keys-url span:hover::after {
    content: "Click to copy";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--askany-dark);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}


/* Form Styles */
.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--askany-dark);
}

.form-field input[type="text"],
.form-field textarea,
input.regular-text,
select.regular-text,
.form-table input[type="text"],
.form-table input[type="password"],
.form-table input[type="url"],
.form-table select {
    width: 100%;
    padding: 10px 15px;
    border-radius: var(--askany-border-radius);
    border: 1px solid var(--askany-gray-light);
    transition: var(--askany-transition);
}

.form-field input[type="text"]:focus,
.form-field textarea:focus,
input.regular-text:focus,
select.regular-text:focus,
.form-table input[type="text"]:focus,
.form-table input[type="password"]:focus,
.form-table input[type="url"]:focus,
.form-table select:focus {
    outline: none;
    border-color: var(--askany-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

.form-field textarea {
    min-height: 120px;
}

.form-field .description {
    color: var(--askany-gray);
    font-size: 13px;
    margin-top: 5px;
}

/* Button Styles */
.button {
    padding: 8px 16px;
    border-radius: var(--askany-border-radius);
    border: 1px solid var(--askany-gray-light);
    background-color: white;
    color: var(--askany-gray);
    font-weight: 500;
    cursor: pointer;
    transition: var(--askany-transition);
}

.button:hover {
    background-color: var(--askany-gray-light);
    color: var(--askany-dark);
}

.button-primary {
    background-color: var(--askany-primary);
    border-color: var(--askany-primary);
    color: white;
}

.button-primary:hover {
    background-color: var(--askany-primary-dark);
    border-color: var(--askany-primary-dark);
    color: white;
}

.button-link-delete {
    color: var(--askany-danger);
    border-color: transparent;
    background-color: transparent;
}

.button-link-delete:hover {
    background-color: rgba(239, 71, 111, 0.1);
    color: var(--askany-danger);
}

.button-small {
    padding: 4px 10px;
    font-size: 12px;
}

button#upload-avatar-button {
    margin-top: 10px;
}

.askany-avatar-upload {
    display: flex;
    gap: 10px;
    justify-content: center;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.askany-admin-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Table Styles */
.wp-list-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: var(--askany-border-radius);
    overflow: hidden;
    border: 1px solid var(--askany-gray-light);
    margin-top: 1.5rem;
}

.wp-list-table th,
.wp-list-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--askany-gray-light);
}

.wp-list-table th {
    background-color: var(--askany-gray-light);
    font-weight: 600;
    color: var(--askany-dark);
}

.wp-list-table tr:last-child td {
    border-bottom: none;
}

.wp-list-table tr:hover td {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Progress Bar */
.progress-bar {
    height: 10px;
    background-color: var(--askany-gray-light);
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--askany-primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Shortcode Display */
.askany-admin-footer {
    background-color: white;
    border-radius: var(--askany-border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: var(--askany-box-shadow);
}

.askany-admin-footer h3 {
    margin-top: 0;
    color: var(--askany-dark);
}

.askany-admin-footer code {
    display: inline-block;
    background-color: var(--askany-gray-light);
    padding: 6px 12px;
    border-radius: var(--askany-border-radius);
    margin: 5px 0;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition: var(--askany-transition);
}

.askany-admin-footer code:hover {
    background-color: var(--askany-primary);
    color: white;
}

.askany-admin-footer code:hover::after {
    content: "Click to copy";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--askany-dark);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}