/* 🎨 PLAYWRIGHT TEST WEBSITE - STYLES
   Author: Copilot With Love 💖
   Purpose: Beautiful test pages for automation framework
*/

/* ===== VARIABLES ===== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --info: #4299e1;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #718096;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    background: var(--gradient);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow-lg);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ===== NAVIGATION ===== */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.nav-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--dark);
    border: 2px solid transparent;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.nav-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.nav-card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.nav-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== TEST SECTIONS ===== */
.test-section {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.test-section h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-section h2 .emoji {
    font-size: 1.5rem;
}

.test-description {
    background: var(--light);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--info);
}

.test-description code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    color: var(--primary-dark);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

/* Button with animation */
.btn-animated {
    position: relative;
    overflow: hidden;
}

.btn-animated::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animated:hover::after {
    width: 300px;
    height: 300px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-control::placeholder {
    color: var(--gray);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ===== SPINNERS & LOADERS ===== */
.spinner {
    display: none;
    width: 50px;
    height: 50px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.active {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-box {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
}

.loading-box p {
    margin-top: 15px;
    color: var(--dark);
}

/* ===== MODALS & POPUPS ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Cookie Banner */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: white;
    padding: 20px;
    z-index: 999;
    animation: slideUp 0.3s ease;
}

.cookie-banner.active {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cookie-banner .content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* ===== HOVER MENU ===== */
.hover-menu-container {
    position: relative;
    display: inline-block;
}

.hover-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    animation: fadeIn 0.2s ease;
}

.hover-menu-container:hover .hover-menu {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hover-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.hover-menu a:hover {
    background: var(--light);
    color: var(--primary);
}

/* ===== HIDDEN ELEMENTS (for testing) ===== */
.element-hidden-display {
    display: none !important;
}

.element-hidden-visibility {
    visibility: hidden !important;
}

.element-hidden-opacity {
    opacity: 0 !important;
}

.element-zero-size {
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.element-offscreen {
    position: absolute !important;
    left: -9999px !important;
}

.element-pointer-none {
    pointer-events: none !important;
}

/* ===== OVERLAY BLOCKING ===== */
.blocking-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.blocking-overlay.active {
    display: block;
}

/* ===== IFRAME CONTAINER ===== */
.iframe-container {
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 15px 0;
}

.iframe-container iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* ===== LOG OUTPUT ===== */
.log-output {
    background: #1a202c;
    color: #68d391;
    padding: 15px;
    border-radius: var(--radius);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.log-output .log-entry {
    padding: 5px 0;
    border-bottom: 1px solid #2d3748;
}

.log-output .log-entry:last-child {
    border-bottom: none;
}

.log-output .timestamp {
    color: #a0aec0;
}

.log-output .success {
    color: #68d391;
}

.log-output .error {
    color: #fc8181;
}

.log-output .info {
    color: #63b3ed;
}

/* ===== CLICK POSITION INDICATOR ===== */
.click-indicator {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--danger);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: clickPulse 0.5s ease forwards;
}

@keyframes clickPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-info {
    color: var(--info);
}

.text-gray {
    color: var(--gray);
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .nav-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .cookie-banner .content {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== BACK TO HOME LINK ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    opacity: 0.9;
    transition: var(--transition);
    margin-bottom: 10px;
}

.back-link:hover {
    opacity: 1;
}

/* ===== STATUS BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(72, 187, 120, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(237, 137, 54, 0.2);
    color: var(--warning);
}

.badge-danger {
    background: rgba(245, 101, 101, 0.2);
    color: var(--danger);
}

.badge-info {
    background: rgba(66, 153, 225, 0.2);
    color: var(--info);
}