/* public/css/style.css – Clean, bright, consistent design */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Libre+Franklin:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
    --font-body: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --color-primary: #1e4a8c;
    --color-primary-hover: #152f56;
    --color-primary-light: #e9eff9;
    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-danger: #dc2626;
    --color-danger-bg: #fef2f2;
    --color-warning: #d97706;
    --color-warning-bg: #fffbeb;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-border-dark: #374151;
    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --focus-ring: 0 0 0 3px rgba(30, 74, 140, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image:
        radial-gradient(ellipse 130% 70% at 50% -25%, rgba(30, 74, 140, 0.09), transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 0%, rgba(5, 150, 105, 0.05), transparent 50%);
    background-attachment: fixed;
}

@keyframes macc-container-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: var(--color-bg-card);
    min-height: 100vh;
    box-shadow: var(--shadow);
    border-radius: 0 0 var(--radius) var(--radius);
    animation: macc-container-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .container {
        animation: none;
    }

    .project-card {
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .project-card:hover {
        transform: none;
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

header .header-logo {
    height: 48px;
    width: auto;
    max-width: 56px;
    display: block;
}

header h1 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--color-primary);
}

/* Check page headline - slightly smaller */
h1.check-headline {
    font-size: 1.3em;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

h2 {
    color: var(--color-text);
    font-size: 1.2rem;
    margin: 24px 0 12px 0;
}

/* Wizard step indicator – consistent across forms */
.wizard-steps {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.wizard-steps .wizard-step {
    color: var(--color-text-muted);
    font-size: 14px;
}

.wizard-steps .wizard-step.active {
    color: var(--color-primary);
    font-weight: 600;
}

.display-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info a {
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: color 0.2s, background 0.2s;
}

.user-info a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Unified Button Styles – clean, consistent */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 4px;
    min-height: 40px;
    line-height: 1.3;
    text-align: center;
    box-sizing: border-box;
}

/* All buttons: clear background, thin dark border; color only on icon/text */
.btn-primary {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-border-dark);
}

.btn-primary:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--color-border-dark);
    color: var(--color-primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-dark);
}

.btn-secondary:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--color-border-dark);
    color: var(--color-text);
}

.btn-success {
    background: transparent;
    color: var(--color-success);
    border: 1px solid var(--color-border-dark);
}

.btn-success:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--color-border-dark);
    color: #047857;
}

.btn-danger {
    background: transparent;
    color: var(--color-danger);
    border: 1px solid var(--color-border-dark);
}

.btn-danger:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--color-border-dark);
    color: #b91c1c;
}

.btn-warning {
    background: transparent;
    color: var(--color-warning);
    border: 1px solid var(--color-border-dark);
}

.btn-warning:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--color-border-dark);
    color: #b45309;
}

.btn-info {
    background: transparent;
    color: #637490;
    border: 1px solid var(--color-border-dark);
}

.btn-info:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--color-border-dark);
    color: #0e7490;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-dark);
}

.btn-outline:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--color-border-dark);
    color: var(--color-text);
}

/* Icon-only buttons – consistent size and hover */
.btn-icon {
    padding: 10px;
    min-width: 40px;
    min-height: 40px;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

/* Button sizes */
.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 32px;
}

.btn-small.btn-icon {
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
}

.btn-small.btn-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    min-height: 48px;
}

/* Disabled state */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    transform: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-text);
    font-size: 14px;
    padding-left: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--color-text-muted);
    font-size: 12px;
}

/* Help icon - ? in circle = more info about this element/section */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 2px;
    border-radius: 6px;
    margin: 0 auto;
    background: #444141;
    text-align: center;
    width: 1.2em;
    height: 1.2em;
    color: #fff;
    cursor: help;
    vertical-align: middle;
    flex-shrink: 0;
}
.help-icon .fa-circle-question,
.help-icon .fa-question {
    font-size: 0.7em;
}
.help-icon:hover {
    background: #a39e9e;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.project-card {
    position: relative;
    padding: 22px 22px 22px 18px;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.3s ease, border-left-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
    border-left-color: var(--color-primary-hover);
}

.project-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.project-card h3 a {
    color: var(--color-primary);
    text-decoration: none;
}

.project-card h3 a:hover {
    text-decoration: underline;
}

.project-card p {
    color: var(--color-text-muted);
    font-size: 14px;
}

.checks-table,
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.checks-table th,
.checks-table td,
.results-table th,
.results-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.checks-table th,
.results-table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--color-text);
    font-size: 13px;
}

.checks-table tbody tr:last-child td,
.results-table tbody tr:last-child td {
    border-bottom: none;
}

.checks-table tbody tr:hover,
.results-table tbody tr:hover {
    background: #f9fafb;
}

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status.active {
    background: var(--color-success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status.inactive {
    background: var(--color-danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.result-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-status.pass {
    background: var(--color-success-bg);
    color: #065f46;
}

.result-status.fail {
    background: var(--color-danger-bg);
    color: #991b1b;
}

.result-status.error {
    background: var(--color-warning-bg);
    color: #92400e;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.info-item label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.info-item value {
    font-weight: 500;
    color: #333;
}

/* Check view: URL on its own row so long URLs don't overlap Check Type */
.check-info .info-item-url {
    grid-column: 1 / -1;
}

.check-info .info-item-url value,
.check-info .info-item-url value a {
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
}

.check-info .info-item-url value a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.check-info .info-item-url value a:hover {
    white-space: normal;
    text-overflow: clip;
}

.error {
    background: var(--color-danger-bg);
    color: #991b1b;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.success {
    background: var(--color-success-bg);
    color: #065f46;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    border: 1px solid #a7f3d0;
    font-size: 14px;
}

.warning {
    background: var(--color-warning-bg);
    color: #92400e;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    border: 1px solid #fde68a;
    font-size: 14px;
}

.suggestion-debug {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

.suggestion-debug.error {
    background: #f8d7da;
    color: #721c24;
}

.suggestion-debug strong {
    display: block;
    margin-bottom: 8px;
}

.url-empty-state {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.error-tooltip {
    cursor: help;
    color: #dc3545;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.actions-left,
.actions-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.actions-right {
    margin-left: auto;
}

nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}

nav a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .checks-table,
    .results-table {
        font-size: 12px;
    }
    
    .checks-table th,
    .checks-table td,
    .results-table th,
    .results-table td {
        padding: 8px 4px;
    }
}

.register-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group input[type="tel"] {
    font-family: monospace;
}

/* Form validation styles */
.form-group input:invalid {
    border-color: #dc3545;
}

.form-group input:valid {
    border-color: #28a745;
}

/* Better spacing for auth forms */
.container h1 {
    text-align: center;
    margin-bottom: 0px;
}

.container p {
    text-align: center;
    margin-top: 20px;
}

.container p a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.container p a:hover {
    text-decoration: underline;
}

/* Center the forms – responsive: up to 80% of container; avoid horizontal scroll on phones */
form {
    max-width: min(80%, 800px);
    min-width: min(100%, 400px);
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Login page: marketing block (left) + form (right); stacked on narrow screens */
.login-page-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
    max-width: 960px;
    margin: 0 auto;
}
.login-marketing-wrap {
    flex: 1 1 320px;
    min-width: 0;
    text-align: left;
}
.login-form-wrap {
    flex: 0 1 380px;
    min-width: 0;
    text-align: left;
}
.login-form-wrap .login-form {
    max-width: 100%;
}
.login-marketing-block {
    padding: 0.5rem 0;
    text-align: left;
}
.login-marketing-wrap .login-marketing-title,
.login-marketing-block .login-marketing-title {
    font-size: 1.35rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-primary);
    text-align: left;
}
.login-form-heading {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 700;
}
.login-marketing-wrap .login-marketing-subtitle,
.login-marketing-block .login-marketing-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 1rem 0;
    text-align: left;
}
.login-marketing-wrap .login-marketing-text,
.login-marketing-block .login-marketing-text {
    color: #555;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}
.login-marketing-block .login-marketing-text:last-child {
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .login-page-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    .login-marketing-wrap {
        order: 1;
    }
    .login-form-wrap {
        order: 2;
        flex: 1 1 auto;
    }
}

/* Project form specific styles */
.project-form {
    max-width: 600px;
    margin: 0 auto;
    background: #f9fafb;
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.project-form .form-group {
    margin-bottom: 25px;
}

.project-form textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

/* Info section styling */
.info-section {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.info-section h3 {
    color: #0056b3;
    margin-bottom: 15px;
}

.info-section ul {
    list-style-type: none;
    padding-left: 0;
}

.info-section li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.info-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Character counter */
.char-counter {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.project-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #666;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Form validation feedback */
.form-group input.is-valid,
.form-group textarea.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.36 1.36L5.54 6.2l.94.94L3.24 10.4 2.3 6.73z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4m0-2.4L5.8 7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .project-form {
        margin: 10px;
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .info-section {
        margin: 20px 10px;
        padding: 15px;
    }

    .project-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .stat-item {
        flex: 1;
        min-width: 60px;
    }
}

/* URL input section styling */
.url-input-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.url-input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.url-counter {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
}

.url-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.url-input-row input[type="url"] {
    flex: 1;
    margin-bottom: 0;
}

.url-input-row .btn-danger {
    white-space: nowrap;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--color-bg-card);
    padding: 28px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.modal-content textarea {
    width: 100%;
    margin: 10px 0;
    font-family: monospace;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Enhanced form styling */
.check-form {
    max-width: 800px;
    margin: 0 auto;
}

.check-form .form-group {
    margin-bottom: 15px;
}

/* Plan Information Styles */
.plan-info {
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(135deg, #aeabb2 0%, #747177 100%);
    border-radius: 10px;
    color: white;
}

.plan-card {
    position: relative;
}

.plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plan-card h3 {
    margin: 0;
    color: white;
    font-size: 1.2em;
}

.plan-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.plan-billing-link,
.plan-details-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.18);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    padding: 0;
}

.plan-billing-link:hover,
.plan-details-toggle:hover {
    background: rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

.plan-billing-link i,
.plan-details-toggle i {
    font-size: 0.9rem;
}

.plan-details-toggle {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.plan-details-layer {
    position: absolute;
    top: 115%;
    right: 0;
    background: #ffffff;
    color: #111827;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
    min-width: 260px;
    max-width: 360px;
    z-index: 40;
    display: none;
}

.plan-card.show-details .plan-details-layer {
    display: block;
}

.plan-details-layer .limit-label,
.plan-details-layer .limit-text {
    color: #111827;
}

.plan-limits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.limit-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.limit-label {
    min-width: 120px;
    font-weight: 500;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.progress-fill[style*="100%"] {
    background: #f44336;
}

.limit-text {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
}

.plan-price {
    margin-top: 10px;
    font-size: 1.1em;
    font-weight: 600;
    color: #FFD700;
}

.plan-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plan-actions .btn-small {
    flex: 1 1 auto;
}

.plan-billing-warning {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #6c757d;
}

.check-limits-info {
    margin: 16px 0;
    padding: 16px 20px;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-primary);
}

.limit-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.limit-display .progress-bar {
    background: #e9ecef;
}

.limit-display .progress-fill {
    background: #007bff;
}

.limit-display .limit-text {
    color: #495057;
    font-weight: 600;
}

/* Admin Form Styles */
.admin-form {
    max-width: 600px;
}

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

.admin-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Special handling for labels with checkboxes */
.admin-form label:has(input[type="checkbox"]),
.admin-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="datetime-local"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.admin-form input[type="checkbox"] {
    margin-right: 8px;
    align-self: flex-start;
    margin-top: 2px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.form-section-heading {
    margin: 0 0 0.5em 0;
    font-size: 1rem;
    color: #495057;
}

.url-suggestion-section .section-help,
.form-section .section-help {
    color: #666;
    margin-bottom: 15px;
}

/* Notification emails list (add/remove chips) */
.notification-emails-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 24px;
}

.notification-email-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.notification-email-remove {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
}

.notification-email-remove:hover {
    color: #dc3545;
}

.notification-emails-add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.notification-emails-add .notification-email-input {
    flex: 1;
    max-width: 280px;
}

.form-section.notification-emails-section {
    padding: 0;
}

.notification-emails-header {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.notification-emails-header .form-section-heading {
    margin: 0;
}

.notification-emails-header .help-icon {
    margin: 0;
}

.notification-emails-subtitle {
    color: #666;
    font-size: 0.95em;
}

.stats-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-item h3 {
    margin: 0 0 5px 0;
    color: #007bff;
    font-size: 24px;
}

.stat-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.admin-actions {
    display: flex;
    gap: 5px;
}

.admin-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* Plan Feature Checkboxes */
.feature-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-checkboxes .form-group {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 0;
}

.feature-checkboxes .form-group label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    cursor: pointer;
    line-height: 1.4;
}

.feature-checkboxes .form-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
    height: auto;
    transform: scale(1.2);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.feature-checkboxes .feature-icon {
    margin-right: 8px;
    font-size: 1.2em;
    flex-shrink: 0;
    line-height: 1;
}

.feature-checkboxes small {
    color: #6c757d;
    font-size: 0.85em;
    line-height: 1.4;
    margin-top: 5px;
    display: block;
}

.check-form h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
}

/* URL validation styling */
.url-input-row input:valid {
    border-color: #28a745;
}

.url-input-row input:invalid {
    border-color: #dc3545;
}

/* URL input animations */
.url-input-row {
    animation: slideIn 0.3s ease-out;
}

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

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

/* Bulk actions styling */
.bulk-url-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.bulk-url-actions .btn-small {
    font-size: 11px;
    padding: 5px 10px;
}

/* URL preview/validation feedback */
.url-preview {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.url-preview.valid {
    color: #28a745;
}

.url-preview.invalid {
    color: #dc3545;
}

/* Multiple URLs info box */
.multi-url-info {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.multi-url-info h4 {
    margin-top: 0;
    color: #0056b3;
    font-size: 14px;
}

.multi-url-info ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.multi-url-info li {
    font-size: 12px;
    margin: 5px 0;
    color: #495057;
}

/* Responsive design for URL inputs */
@media (max-width: 768px) {
    .url-input-row {
        flex-direction: column;
        gap: 5px;
    }

    .url-input-row input[type="url"] {
        width: 100%;
    }

    .url-input-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .bulk-url-actions {
        justify-content: center;
    }

    .modal-content {
        margin: 20px;
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }
}

/* URL counter badge styling */
.url-counter {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.url-counter span {
    font-weight: bold;
    color: #007bff;
}

/* Import button styling - now handled by unified button styles */

/* URL input focus effects */
.url-input-row input[type="url"]:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #007bff;
}

/* Drag and drop styling (for future enhancement) */
.url-input-section.drag-over {
    border-color: #007bff;
    background: #e7f3ff;
}

/* URL status indicators */
.url-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 5px;
}

.url-status.valid {
    background: #28a745;
}

.url-status.invalid {
    background: #dc3545;
}

.url-status.checking {
    background: #ffc107;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Check group styling */
.check-group {
    margin: 25px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    overflow: hidden;
}

.check-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.check-group-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-badge {
    background: #007bff;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: normal;
}

.group-actions {
    display: flex;
    gap: 10px;
}

.group-summary {
    padding: 15px 20px;
    background: white;
}

.summary-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.summary-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.summary-stats .stat strong {
    font-size: 16px;
    color: #333;
}

.stat.status-pass strong {
    color: #28a745;
}

.stat.status-fail strong {
    color: #dc3545;
}

.group-details {
    border-top: 1px solid #dee2e6;
    background: white;
}

.group-details .checks-table {
    margin: 0;
}

.group-details .checks-table th,
.group-details .checks-table td {
    padding: 8px 12px;
    font-size: 13px;
}

/* Individual checks section */
.individual-checks {
    margin-top: 30px;
}

.individual-checks h3 {
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #dee2e6;
}

/* Status indicators for table rows */
.checks-table tr.pass {
    border-left: 4px solid #28a745;
}

.checks-table tr.fail {
    border-left: 4px solid #dc3545;
    background-color: #fff5f5;
}

.checks-table tr.error {
    border-left: 4px solid #ffc107;
    background-color: #fffbf0;
}

.checks-table tr.pending {
    border-left: 4px solid #6c757d;
}

/* Enhanced result status badges */
.result-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-status.pass {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-status.fail {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result-status.error {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.result-status.pending {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Loading states for group actions */
.group-actions .btn.loading {
    position: relative;
    color: transparent;
}

.group-actions .btn.loading::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    top: 50%;
    left: 50%;
    margin-left: -6px;
    margin-top: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Hover effects */
.check-group:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.check-group-header:hover {
    background: #e2e6ea;
}

/* Expandable animation */
.group-details {
    transition: all 0.3s ease;
}

/* URL truncation for better display */
.checks-table td a {
    max-width: 200px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* Action buttons spacing */
.checks-table td .btn {
    margin: 2px;
}

/* Progress indicators */
.group-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.group-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .check-group-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .group-actions {
        justify-content: center;
    }

    .summary-stats {
        justify-content: center;
        gap: 15px;
    }

    .summary-stats .stat {
        text-align: center;
    }

    .checks-table {
        font-size: 11px;
    }

    .checks-table th,
    .checks-table td {
        padding: 6px 4px;
    }

    .checks-table td a {
        max-width: 120px;
    }

    .group-details .checks-table th:nth-child(3),
    .group-details .checks-table td:nth-child(3) {
        display: none;
        /* Hide "Last Check" column on mobile */
    }
}

/* Print styles */
@media print {

    .group-actions,
    .checks-table .btn {
        display: none;
    }

    .check-group {
        break-inside: avoid;
        border: 1px solid #000;
    }

    .group-details {
        display: block !important;
    }
}

/* Dark mode support (if you want to add it later) */
@media (prefers-color-scheme: dark) {
    .check-group {
        background: #2d3748;
        border-color: #4a5568;
    }

    .check-group-header {
        background: #4a5568;
        color: #e2e8f0;
    }

    .group-summary {
        background: #2d3748;
        color: #e2e8f0;
    }

    .group-details {
        background: #2d3748;
    }
}

/* Regex form styling */
.regex-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.regex-input-container input[type="text"] {
    flex: 1;
}

.regex-flags {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.regex-flags input {
    width: 100px;
}

.regex-test {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.regex-test h4 {
    margin-top: 0;
    color: #333;
}

.regex-results {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

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

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

.regex-success,
.match-count {
    margin-bottom: 10px;
}

.matches ul {
    margin: 5px 0 0 20px;
}

.matches code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 12px;
}

/* Regex examples modal */
.regex-examples {
    max-height: 400px;
    overflow-y: auto;
}

.regex-example {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.regex-example:hover {
    background: #f0f0f0;
}

.regex-example code {
    display: block;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #d63384;
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 2px;
}

.regex-tips {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 4px;
}

.regex-tips ul {
    columns: 2;
    column-gap: 20px;
}

.regex-tips li {
    margin: 5px 0;
    break-inside: avoid;
}

.regex-error {
    font-weight: bold;
}

/* Results display for regex matches */
.regex-matches {
    font-size: 12px;
}

.matches-preview {
    margin-top: 5px;
}

.match-item {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
}

.more-matches {
    color: #666;
    font-style: italic;
    font-size: 11px;
}

/* Code display in info sections */
.info-item code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #d63384;
    border: 1px solid #e9ecef;
    word-break: break-all;
}

/* Related checks section */
.related-checks-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.related-checks-section h2 {
    color: #495057;
}

/* Pattern help tooltip */
.pattern-help {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #007bff;
    margin-left: 5px;
}

.pattern-help:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Regex pattern validation feedback */
.regex-pattern-feedback {
    margin-top: 5px;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.regex-pattern-feedback.valid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.regex-pattern-feedback.invalid {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Test results highlighting */
.test-content-highlighted {
    background: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.test-match-highlight {
    background: #ffeb3b;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: bold;
}

/* Loading states for regex testing */
.regex-test-loading {
    opacity: 0.6;
    pointer-events: none;
}

.regex-test-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced modal styling for regex features */
.modal .regex-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.regex-cheatsheet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.regex-cheat-section {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.regex-cheat-section h5 {
    margin-top: 0;
    color: #495057;
    font-size: 14px;
}

.regex-cheat-item {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 12px;
}

.regex-cheat-pattern {
    font-family: monospace;
    background: #e9ecef;
    padding: 1px 4px;
    border-radius: 2px;
    color: #d63384;
}

/* Responsive design for regex features */
@media (max-width: 768px) {
    .regex-input-container {
        flex-direction: column;
        align-items: stretch;
    }

    .regex-flags {
        flex-direction: column;
        align-items: stretch;
    }

    .regex-flags input {
        width: 100%;
    }

    .regex-tips ul {
        columns: 1;
    }

    .match-item {
        max-width: 150px;
    }

    .info-item code {
        word-break: break-all;
        white-space: pre-wrap;
    }

    .regex-cheatsheet {
        grid-template-columns: 1fr;
    }
}

/* Enhanced check type styling */
.check-type-regex {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Pattern complexity indicator */
.pattern-complexity {
    display: inline-block;
    margin-left: 10px;
    font-size: 11px;
}

.pattern-complexity.simple {
    color: #28a745;
}

.pattern-complexity.moderate {
    color: #ffc107;
}

.pattern-complexity.complex {
    color: #dc3545;
}

.pattern-complexity::before {
    content: "●";
    margin-right: 3px;
}

/* Performance warning for complex patterns */
.performance-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 12px;
}

.performance-warning strong {
    display: block;
    margin-bottom: 5px;
}

/* Regex match count indicator */
.match-count-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #666;
}

.match-count-indicator .count {
    background: #007bff;
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Syntax highlighting for regex patterns */
.regex-syntax-highlight {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
}

.regex-syntax-highlight .group {
    color: #0066cc;
    font-weight: bold;
}

.regex-syntax-highlight .quantifier {
    color: #cc0066;
    font-weight: bold;
}

.regex-syntax-highlight .escape {
    color: #009900;
    font-weight: bold;
}

.regex-syntax-highlight .anchor {
    color: #cc6600;
    font-weight: bold;
}

/* Quick test section */
.quick-test-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.quick-test-section h4 {
    margin-top: 0;
    color: #495057;
    font-size: 14px;
}

.quick-test-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    min-height: 60px;
}

.quick-test-results {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 40px;
}

/* Animation for successful pattern test */
@keyframes pattern-success {
    0% {
        background-color: #d4edda;
    }

    100% {
        background-color: transparent;
    }
}

.pattern-test-success {
    animation: pattern-success 0.5s ease-out;
}

/* Animation for failed pattern test */
@keyframes pattern-error {
    0% {
        background-color: #f8d7da;
    }

    100% {
        background-color: transparent;
    }
}

.pattern-test-error {
    animation: pattern-error 0.5s ease-out;
}

/* Collapsible regex help sections */
.regex-help-toggle {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
    margin-left: 10px;
}

.regex-help-content {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    line-height: 1.4;
}

.regex-help-content.show {
    display: block;
}

/* Custom scrollbar for regex examples */
.regex-examples::-webkit-scrollbar {
    width: 6px;
}

.regex-examples::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.regex-examples::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.regex-examples::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Print styles for regex patterns */
@media print {

    .regex-test,
    .regex-examples-modal,
    .modal {
        display: none !important;
    }

    .info-item code {
        background: #f0f0f0 !important;
        border: 1px solid #ccc !important;
        color: #000 !important;
    }

    .regex-matches {
        page-break-inside: avoid;
    }
}

/* Floating notification system */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: #333;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    position: relative;
    word-wrap: break-word;
    max-width: 100%;
}

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

.notification.success {
    background: #28a745;
    border-left: 4px solid #1e7e34;
}

.notification.error {
    background: #dc3545;
    border-left: 4px solid #c82333;
}

.notification.warning {
    background: #ffc107;
    color: #212529;
    border-left: 4px solid #e0a800;
}

.notification.info {
    background: #17a2b8;
    border-left: 4px solid #138496;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.notification-message {
    font-size: 13px;
    line-height: 1.4;
}

/* Progress bar for auto-dismiss */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    transition: width linear;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        margin-bottom: 8px;
        padding: 12px 16px;
    }
}
// Admin
.admin-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 5px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.admin-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
    transform: scale(1.2);
    flex-shrink: 0;
}

.checkbox-text {
    font-weight: 500;
    color: #333;
}

.js-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.warning-content {
    color: #856404;
}

.warning-content ul {
    margin: 10px 0 0 20px;
    font-size: 13px;
}

.warning-content li {
    margin: 5px 0;
}

/* Additional button utilities */
.btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
}

/* Whole Page Content Option Styling */
.whole-page-option {
    background: #e8f4f8;
    border: 2px solid #0288d1;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.whole-page-option .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.whole-page-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.whole-page-option strong {
    color: #01579b;
    font-size: 16px;
}

.whole-page-option .help-text {
    color: #0277bd;
    font-size: 13px;
    font-style: italic;
    margin-left: auto;
}

#specific-elements-section {
    margin-top: 15px;
}

/* Compare with previous result styling */
.content-change-indicator {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px;
    margin: 5px 0;
}

.change-badge {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.no-change-indicator {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 8px;
    margin: 5px 0;
}

.no-change {
    color: #155724;
    font-size: 12px;
    font-weight: 500;
}

.compare-details {
    margin-top: 5px;
    font-family: monospace;
    font-size: 11px;
    color: #495057;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 6px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.compare-details small {
    display: block;
    line-height: 1.3;
    margin: 2px 0;
}