/* ===== JIRA TICKET GENERATOR STYLES ===== */

/* Base Styles */
:root {
    --primary-dark: #1a202c;    /* Dark navy from Goudplevier.co.uk */
    --primary-text: #ffffff;    /* White text */
    --secondary-text: #e2e8f0;  /* Light gray for secondary text */
    --accent-color: #e74694;    /* Pink accent from website */
    --accent-secondary: #f97316; /* Orange accent from website */
    --accent-hover: #d946ef;    /* Hover state */
    --card-bg: #2d3748;         /* Slightly lighter navy for cards */
    --border-color: #4a5568;    /* Border color */
    --gradient-start: #e74694;  /* Start of gradient (pink) */
    --gradient-end: #f97316;    /* End of gradient (orange) */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--primary-text);
    background-color: var(--primary-dark);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Container Styles */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    width: 100%;
}

/* Header Styles */
header {
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-text);
    margin-bottom: 10px;
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: 'AI';
    position: absolute;
    top: -10px;
    right: -30px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 4px;
    transform: rotate(15deg);
}

p {
    color: var(--secondary-text);
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-text);
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 12px;
    color: var(--secondary-text);
    letter-spacing: 0.5px;
}

/* Form Container */
#ticketForm {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

#ticketForm::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-section h2, 
.form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-text);
    font-size: 1.3em;
    font-weight: 600;
}

.form-section label {
    margin-top: 15px;
    margin-bottom: 8px;
    display: block;
    color: var(--secondary-text);
    font-weight: 600;
    font-size: 0.95em;
}

.form-section input,
.form-section select,
.form-section textarea {
    margin-bottom: 18px;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    background-color: var(--primary-dark);
    color: var(--primary-text);
    transition: all 0.3s ease;
    font-size: 15px;
}

.form-section input[type="file"] {
    background: transparent;
    border: none;
    padding: 0;
}

.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(231, 70, 148, 0.2);
}

/* Preview Box */
.preview-box {
    background: var(--primary-dark);
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    white-space: pre-line;
    border-left: 4px solid var(--accent-color);
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#userStoryPreview {
    font-size: 16px;
    line-height: 1.8;
    padding: 25px;
}

/* Advanced Section - Removed */

#generateBtn {
    width: 100%;
    margin-top: 30px;
    padding: 16px;
    font-size: 16px;
    letter-spacing: 0.5px;
    position: relative;
}

/* Generate Button Loading Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
}

.generating {
    background: linear-gradient(270deg, 
        var(--gradient-start), 
        var(--accent-secondary), 
        #9333ea, 
        #3b82f6, 
        var(--gradient-end));
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite;
    cursor: progress;
    box-shadow: 0 0 15px rgba(231, 70, 148, 0.5);
    position: relative;
    overflow: hidden;
}

.generating-text {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generating-gif {
    position: absolute;
    top: 50%;
    left: 120%;
    transform: translate(-50%, -50%);
    height: 40px;
    width: 40px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 5;
}

.generating-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.generating::before {
    display: none;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
    animation: sparkle 1.5s ease-in-out infinite;
}

/* Buttons */
button {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-end), var(--gradient-start));
    transition: left 0.3s ease;
    z-index: -1;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:hover::before {
    left: 0;
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:disabled:not(.generating) {
    background: #4b5563;
    cursor: not-allowed;
}

/* Highlighting */
.highlight {
    background: linear-gradient(90deg, rgba(231, 70, 148, 0.2), rgba(249, 115, 22, 0.2));
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: var(--primary-text);
}

/* Role Suggestions */
.role-suggestion {
    background: rgba(231, 70, 148, 0.1);
    padding: 12px;
    margin: 12px 0;
    cursor: pointer;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.2s ease;
}

.role-suggestion:hover {
    background: rgba(231, 70, 148, 0.2);
    transform: translateX(2px);
}

.role-confidence {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
    font-weight: 600;
}

.confidence-high {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.confidence-medium {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.confidence-low {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Output Section */
.output-section {
    margin-top: 40px;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--card-bg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.output-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.output-section h2 {
    margin-top: 0;
    color: var(--primary-text);
    font-size: 1.8em;
    position: relative;
    display: inline-block;
}

.output-section h3 {
    color: var(--primary-text);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-top: 25px;
}

.output-section h4 {
    color: var(--secondary-text);
    margin-bottom: 5px;
    font-weight: 600;
}

/* Copy Button */
.copy-btn {
    float: right;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    color: var(--primary-text);
    padding: 8px 12px;
    font-size: 13px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Tooltip Styles */
.tooltip-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tooltip-container::after {
    content: "ℹ️";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: var(--accent-color);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.tooltip {
    visibility: hidden;
    width: 90%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 10;
    top: -5px;
    right: -15px;
    transform: translateY(-100%);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 0.95em;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.5;
}

.tooltip::before {
    content: "";
    position: absolute;
    bottom: -10px;
    right: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: var(--gradient-end) transparent transparent transparent;
}

.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(-110%);
}

.tooltip-container textarea {
    margin-bottom: 0;
}

/* Utility Classes */
.required {
    color: #ef4444;
    margin-left: 3px;
}

.warning {
    color: #ef4444;
    font-size: 0.9em;
    margin-top: 5px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Footer */
footer {
    margin-top: 50px;
    text-align: center;
    color: var(--secondary-text);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .form-section, .output-section {
        padding: 15px;
    }
    
    .preview-box {
        padding: 15px;
    }
}
