/* shared_styles.css */

/* Root Variables */
:root {
    --primary-color: #08041c;
    --secondary-color: #2b2947;
    --text-color-light: #d3d3d3;
    --text-color-dark: #08041c;
    --text-color-white: #ffffff;
    --light-bg: #2c1c5a;
    --input-bg: rgba(255, 255, 255, 1);
    --button-gradient-left: #ff8f00;
    --button-gradient-right: #ee4848;
    --button-gradient-hover-left: #ff7800;
    --button-gradient-hover-right: #ea2929;
    --border-radius: 8px;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --form-bg: #ffffff08;
    --input-border: #ccc;
    --input-focus-shadow: rgba(255, 143, 0, 0.25);
    --button-hover-bg: #e0e0e0;
    --response-bg: #f8f9fa;
    --response-border: #bbbbbb;
    --response-color: #343a40;
    --bs-tooltip-bg: rgba(255, 0, 0, 0.99);
}

/* General Body Styling */

[id^='responseContent'] .response-details,
#responseContent .response-details {
    margin-top: 0.5rem;
}

[id^='responseContent'] .response-details-name,
#responseContent .response-details-name {
    color: var(--text-color-dark);
    margin-top: 0.5rem;
}

[id^='responseContent'] .response-details-value,
#responseContent .response-details-value {
    color: var(--bs-tooltip-bg);
}

label[for='additionalInstructions'] {
    color: var(--text-color-dark);
    font-weight: 600;
}

/* Force all text in the response to use the response-color */
[id^='responseContent'] *,
#responseContent * {
    color: var(--response-color);
}

.mt-90 {
    margin-top: 90px !important;
}

/* Header Styling */
.headerbg {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--form-bg) !important;
}

/* Form Styling */
form {
    background-color: var(--form-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow-color);
}

textarea {
    resize: none;
    border-radius: var(--border-radius);
    border: 1px solid var(--input-border);
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px var(--input-focus-shadow);
}

button {
    border: none;
    border-radius: var(--border-radius);
    transition:
        background-color 0.3s,
        transform 0.2s;
    cursor: pointer;
}

button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.02);
    color: var(--text-color-light);
}

button.accordion-button {
    transform: none;
}

.accordion-button:hover {
    background-color: #fff;
    color: var(--text-color-dark);
}

button:focus {
    outline: none;
    box-shadow: 0 0 5px var(--secondary-color);
}

.btn-waiting {
    position: relative;
}

#spinner {
    margin-right: 8px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color-light);
    font-weight: 700;
}

.nav-link.dropdown-toggle {
    display: block;
}
/* Form Styles */
.form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color-dark);
    padding: 12px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--button-gradient-left);
    box-shadow: 0 0 0 0.2rem var(--input-focus-shadow);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--input-bg);
    opacity: 0.7;
}

/* Select Styles */
select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-image: linear-gradient(to right, var(--button-gradient-left), var(--button-gradient-right));
    border: none;
    color: var(--text-color-white);
}

.btn-primary:hover {
    background-image: linear-gradient(to right, var(--button-gradient-hover-left), var(--button-gradient-hover-right));
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--shadow-color);
}

/* Copy Button Styling */
#copyButton {
    border: 1px solid var(--input-border);
    background-color: var(--light-bg);
    color: var(--text-color);
    transition: background-color 0.3s;
}

#copyButton:hover {
    background-color: var(--button-hover-bg);
}

.btn-outline-secondary:hover {
    color: #fff !important;
    background-color: #212529;
    border-color: #6c757d;
}

/* Response Div Styling */
[id^='results'],
#results {
    /* background-color: var(--light-bg); */
    border: 1px solid var(--response-border);
    box-shadow: 0 4px 6px var(--shadow-color);
    border-radius: var(--border-radius);
}

/* Response Content Styles */
[id^='responseContent'],
#responseContent {
    background-color: var(--response-bg);
    border: 1px solid var(--response-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    color: var(--response-color);
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

[id^='responseContent'] h1,
[id^='responseContent'] h2,
[id^='responseContent'] h3,
[id^='responseContent'] h4,
[id^='responseContent'] h5,
[id^='responseContent'] h6,
#responseContent h1,
#responseContent h2,
#responseContent h3,
#responseContent h4,
#responseContent h5,
#responseContent h6 {
    color: var(--response-color);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

[id^='responseContent'] table,
#responseContent table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

[id^='responseContent'] th,
[id^='responseContent'] td,
#responseContent th,
#responseContent td {
    padding: 15px;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    color: var(--response-color);
}

[id^='responseContent'] th,
#responseContent th {
    background-color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-top: 1px solid #eee;
    color: var(--text-color-light);
}

[id^='responseContent'] tr:nth-child(even) td,
#responseContent tr:nth-child(even) td {
    background-color: #f8f9fa;
}

[id^='responseContent'] tr:last-child td,
#responseContent tr:last-child td {
    border-bottom: none;
}

[id^='responseContent'] tr td:first-child,
[id^='responseContent'] tr th:first-child,
#responseContent tr td:first-child,
#responseContent tr th:first-child {
    border-left: 1px solid #eee;
}

[id^='responseContent'] tr td:last-child,
[id^='responseContent'] tr th:last-child,
#responseContent tr td:last-child,
#responseContent tr th:last-child {
    border-right: 1px solid #eee;
}

[id^='responseContent'] tr:first-child th:first-child,
#responseContent tr:first-child th:first-child {
    border-top-left-radius: 10px;
}

[id^='responseContent'] tr:first-child th:last-child,
#responseContent tr:first-child th:last-child {
    border-top-right-radius: 10px;
}

[id^='responseContent'] tr:last-child td:first-child,
#responseContent tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

[id^='responseContent'] tr:last-child td:last-child,
#responseContent tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

[id^='responseContent'] h1,
#responseContent h1 {
    font-size: 2rem;
}
[id^='responseContent'] h2,
#responseContent h2 {
    font-size: 1.875rem;
}
[id^='responseContent'] h3,
#responseContent h3 {
    font-size: 1.5rem;
}
[id^='responseContent'] h4,
#responseContent h4 {
    font-size: 1.3rem;
}
[id^='responseContent'] h5,
#responseContent h5 {
    font-size: 1.2rem;
}
[id^='responseContent'] h6,
#responseContent h6 {
    font-size: 1.1rem;
}

[id^='responseContent'] p,
[id^='responseContent'] ul,
[id^='responseContent'] ol,
#responseContent p,
#responseContent ul,
#responseContent ol {
    margin-bottom: 1rem;
}

[id^='responseContent'] ul,
[id^='responseContent'] ol,
#responseContent ul,
#responseContent ol {
    padding-left: 2rem;
}

[id^='responseContent'] li,
#responseContent li {
    margin-bottom: 0.5rem;
}

[id^='responseContent'] strong,
#responseContent strong {
    font-weight: 600;
    color: var(--response-color);
}

[id^='responseContent'] hr,
#responseContent hr {
    border: 0;
    border-top: 1px solid var(--response-border);
    margin: 2rem 0;
}

[id^='responseContent'] a,
#responseContent a {
    color: var(--secondary-color);
    text-decoration: none;
}

[id^='responseContent'] a:hover,
#responseContent a:hover {
    text-decoration: underline;
}

.headerbg {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color-white) !important;
}

.social-media-content {
    font-family: Arial, sans-serif;
    line-height: 1.4;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.social-media-content h5 {
    margin-bottom: 10px;
    color: #6c757d;
}

.social-media-content hr {
    margin: 10px 0;
    border: 0;
    border-top: 1px solid #e9ecef;
}

.social-media-content h1 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.social-media-content p {
    margin-bottom: 10px;
}

.social-media-content ul,
.social-media-content ol {
    padding-left: 20px;
}

.social-media-content li {
    margin-bottom: 5px;
}

.social-media-content a {
    color: #1da1f2;
    text-decoration: none;
}

.social-media-content a:hover {
    text-decoration: underline;
}

/* Tooltip box */
.tooltip {
    color: #ffffff !important;
    font-size: 0.875rem !important;
    padding: 8px !important;
    border-radius: 5px !important;
}

/* Tooltip inner content */
.tooltip .tooltip-inner {
    background-color: var(--bs-tooltip-bg) !important;
    color: #ffffff !important;
    border-radius: 5px !important;
}

/* Tooltip arrow */
.tooltip-arrow::before {
    background-color: var(--bs-tooltip-bg) !important;
    border: none !important;
}

/* Button Styles */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.copy-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.copy-buttons-container button {
    cursor: pointer;
}

.glass-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.glass-card-body {
    padding: 20px;
}

/* Notification Styles */
.notification-container {
    position: fixed;
    bottom: 20px; /* Changed from top to bottom */
    right: 20px;
    z-index: 9999;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    overflow: hidden;
    transform: translateX(120%);
    transition: transform 0.4s ease-in-out;
}

.notification[data-type='success'] {
    border-left: 4px solid #28a745;
}

.notification[data-type='error'] {
    border-left: 4px solid #dc3545;
}

.notification[data-type='warning'] {
    border-left: 4px solid #ffc107;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 15px;
}

.notification-icon {
    margin-right: 15px;
}

.notification[data-type='success'] .notification-icon svg {
    stroke: #28a745;
}

.notification[data-type='error'] .notification-icon svg {
    stroke: #dc3545;
}

.notification[data-type='warning'] .notification-icon svg {
    stroke: #ffc107;
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin: 0;
    color: #333;
}

.notification-message {
    margin: 5px 0 0;
    color: #666;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 1rem;
}

.breadcrumb-link {
    color: #6c757d;
    text-decoration: underline;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #495057;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    form {
        padding: 15px;
    }

    textarea {
        font-size: 14px;
    }

    [id^='responseContent'],
    #responseContent {
        font-size: 14px;
    }

    .copy-buttons-container {
        width: 100%;
        justify-content: space-between;
    }

    .copy-buttons-container .btn {
        flex: 1;
        min-width: 60px;
    }

    .container {
        padding: 10px;
    }
    .btn {
        width: 100%;
    }
    [id^='responseContent'],
    #responseContent {
        padding: 1rem;
    }
    [id^='responseContent'] h1,
    #responseContent h1 {
        font-size: 1.5rem;
    }
    [id^='responseContent'] h2,
    #responseContent h2 {
        font-size: 1.3rem;
    }
    [id^='responseContent'] h3,
    #responseContent h3 {
        font-size: 1.2rem;
    }
    [id^='responseContent'] h4,
    #responseContent h4 {
        font-size: 1.1rem;
    }
    [id^='responseContent'] h5,
    [id^='responseContent'] h6,
    #responseContent h5,
    #responseContent h6 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    [id^='responseContent'],
    #responseContent {
        padding: 0.75rem;
    }
    [id^='responseContent'] h1,
    #responseContent h1 {
        font-size: 1.75rem;
    }
    [id^='responseContent'] h2,
    #responseContent h2 {
        font-size: 1.5rem;
    }
    [id^='responseContent'] h3,
    #responseContent h3 {
        font-size: 1.25rem;
    }
    [id^='responseContent'] h4,
    [id^='responseContent'] h5,
    [id^='responseContent'] h6,
    #responseContent h4,
    #responseContent h5,
    #responseContent h6 {
        font-size: 1rem;
    }
}
