/* ============================================
   HREFLANG-GENERATOR.HTML - SAYFA ÖZEL STİLLER
   Hreflang Generator - Çok Dilli SEO Etiketleri
   ============================================ */

/* 2. URL ENTRIES CONTAINER */
.hreflang-urls-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* 3. URL ENTRY CARD */
.hreflang-url-entry {
    background: var(--card-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.hreflang-url-entry:hover {
    border-color: var(--primary, #26bcc2);
    box-shadow: 0 4px 20px rgba(38, 188, 194, 0.1);
}

/* 4. URL ENTRY HEADER */
.url-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.entry-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary, #26bcc2), var(--success, #0ea5e9));
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
}

.remove-url-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-url-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.remove-url-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 5. LANGUAGE & REGION GROUP */
.language-region-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .language-region-group {
        grid-template-columns: 1fr;
    }
}

/* 6. SELECT STYLING */
.lang-select,
.region-select,
.output-format-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-select:hover,
.region-select:hover,
.output-format-select:hover {
    border-color: var(--primary, #26bcc2);
}

.lang-select:focus,
.region-select:focus,
.output-format-select:focus {
    outline: none;
    border-color: var(--primary, #26bcc2);
    box-shadow: 0 0 0 3px rgba(38, 188, 194, 0.1);
}

/* 7. CHECKBOX LABEL */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary, #26bcc2);
}

.checkbox-label span {
    font-size: 0.9375rem;
    color: var(--text-primary, #e2e8f0);
}

/* 8. URL ACTIONS */
.url-actions {
    margin-bottom: 1.5rem;
}

/* 9. PREVIEW TEXTAREA */
.hreflang-preview {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    background: var(--input-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.hreflang-preview:focus {
    outline: none;
    border-color: var(--primary, #26bcc2);
    box-shadow: 0 0 0 3px rgba(38, 188, 194, 0.1);
}

.hreflang-preview::placeholder {
    color: var(--text-muted, rgba(226, 232, 240, 0.4));
}

/* 10. STATS GRID */
.hreflang-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hreflang-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.stat-item {
    background: var(--card-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--primary, #26bcc2);
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted, rgba(226, 232, 240, 0.6));
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary, #26bcc2);
}

/* 11. VALIDATION MESSAGES */
.validation-messages {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.validation-messages h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.validation-messages h3 i {
    font-size: 1.25rem;
}

.validation-messages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-messages li {
    padding: 0.5rem 0;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.9375rem;
    position: relative;
    padding-left: 1.5rem;
}

.validation-messages li::before {
    content: "⚠";
    position: absolute;
    left: 0;
    color: #fbbf24;
}

/* 12. FORM HELP TEXT */
.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted, rgba(226, 232, 240, 0.6));
}

/* 13. DARK MODE ADJUSTMENTS */
@media (prefers-color-scheme: dark) {
    .hreflang-url-entry {
        background: rgba(255, 255, 255, 0.03);
    }

    .lang-select,
    .region-select,
    .output-format-select {
        background: rgba(255, 255, 255, 0.03);
    }

    .hreflang-preview {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* 14. LIGHT MODE OVERRIDES */
@media (prefers-color-scheme: light) {
    .hreflang-url-entry {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .hreflang-url-entry:hover {
        box-shadow: 0 4px 20px rgba(38, 188, 194, 0.15);
    }

    .url-entry-header {
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }

    .lang-select,
    .region-select,
    .output-format-select {
        background: white;
        border-color: rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }

    .checkbox-label span {
        color: #1e293b;
    }

    .hreflang-preview {
        background: white;
        border-color: rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }

    .hreflang-preview::placeholder {
        color: rgba(0, 0, 0, 0.4);
    }

    .stat-item {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .stat-label {
        color: rgba(0, 0, 0, 0.6);
    }

    .validation-messages {
        background: rgba(251, 191, 36, 0.1);
        border-color: rgba(251, 191, 36, 0.4);
    }

    .validation-messages li {
        color: #1e293b;
    }

    .form-help {
        color: rgba(0, 0, 0, 0.6);
    }
}

/* 15. ANIMATION */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hreflang-url-entry {
    animation: slideIn 0.3s ease;
}

/* 16. PRINT STYLES */
@media print {
    .url-actions,
    .action-buttons,
    .remove-url-btn {
        display: none;
    }

    .hreflang-url-entry {
        break-inside: avoid;
    }
}

/* ============================================
   MODERN BUTTON & FORM ENHANCEMENTS
   ============================================ */

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Renk tanımları style.css'ten alınacak */
.primary-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.primary-btn i {
    font-size: 1.1rem;
}

.secondary-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid var(--border);
}

.secondary-btn:hover {
    border-color: var(--primary, #26bcc2);
}

.secondary-btn:disabled {
    cursor: not-allowed;
}

.secondary-btn i {
    font-size: 1.1rem;
}

/* Form Group */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 8px;
}

/* URL Input */
.url-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.url-input:hover {
    border-color: var(--primary, #26bcc2);
}

.url-input:focus {
    outline: none;
    border-color: var(--primary, #26bcc2);
    box-shadow: 0 0 0 3px rgba(38, 188, 194, 0.1);
}

.url-input::placeholder {
    color: var(--text-muted, rgba(226, 232, 240, 0.4));
}

/* Card Header Enhancement */
.card-header {
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--primary, #26bcc2);
    font-size: 1.3rem;
}

.card-description {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted, rgba(226, 232, 240, 0.6));
    line-height: 1.6;
}

/* Preview Container */
.preview-container {
    margin-bottom: 1.5rem;
}

/* Hreflang Editor Card */
.robots-editor-card {
    background: var(--card-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.robots-editor-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(38, 188, 194, 0.2);
}

/* Smart Padding System - Card Body */
.robots-editor-card > :not(.card-header) {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.robots-editor-card .card-header + * {
    padding-top: 0.75rem;
}

.robots-editor-card > :last-child:not(.card-header) {
    padding-bottom: 0.75rem;
}

/* Zero Padding Override - Specific Elements */
.robots-editor-card .hreflang-urls-container,
.robots-editor-card .url-actions,
.robots-editor-card .action-buttons,
.robots-editor-card .hreflang-stats-grid,
.robots-editor-card .preview-container {
    padding: 0;
}

/* Form group için sadece padding sıfır (margin-bottom KALSIN - spacing için gerekli) */
.robots-editor-card .form-group {
    padding: 0;
}

/* Validation messages özel düzenleme */
.robots-editor-card .validation-messages {
    padding: 1.25rem;
    margin-bottom: 0;
}

/* Loading State */
.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.primary-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Template Section */
.template-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
}

.template-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 0.75rem;
}

.template-label i {
    color: var(--primary, #26bcc2);
}

.template-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.template-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-btn i {
    font-size: 1.25rem;
    color: var(--primary, #26bcc2);
}

.template-btn:hover {
    background: var(--primary, #26bcc2);
    border-color: var(--primary, #26bcc2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 188, 194, 0.3);
}

.template-btn:hover i {
    color: white;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-content {
    background: var(--card-bg, rgba(30, 41, 59, 0.95));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary, #e2e8f0);
}

.modal-header h3 i {
    color: var(--primary, #26bcc2);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.import-format-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.import-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    background: var(--input-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.import-textarea:focus {
    outline: none;
    border-color: var(--primary, #26bcc2);
    box-shadow: 0 0 0 3px rgba(38, 188, 194, 0.1);
}

.import-textarea::placeholder {
    color: var(--text-muted, rgba(226, 232, 240, 0.4));
    font-size: 0.8125rem;
}

/* Main Content No Padding */
.main-content-no-padding {
    padding-top: 0 !important;
}

/* Robots Main Grid */
.robots-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

/* Light Mode Adjustments for New Styles */
@media (prefers-color-scheme: light) {
    .form-group label,
    .card-header h2 {
        color: #1e293b;
    }

    .card-description {
        color: rgba(0, 0, 0, 0.6);
    }

    .card-header {
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }

    .url-input {
        background: white;
        border-color: rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }

    .url-input::placeholder {
        color: rgba(0, 0, 0, 0.4);
    }

    .robots-editor-card {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .robots-editor-card:hover {
        box-shadow: 0 8px 20px rgba(38, 188, 194, 0.15);
    }

    .template-section {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .template-label {
        color: #1e293b;
    }

    .template-btn {
        background: white;
        border-color: rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }

    .modal-content {
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .modal-header h3 {
        color: #1e293b;
    }

    .import-format-select,
    .import-textarea {
        background: white;
        border-color: rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }

    .import-textarea::placeholder {
        color: rgba(0, 0, 0, 0.4);
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .robots-editor-card {
        background: rgba(30, 41, 59, 0.7);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .secondary-btn {
        background: rgba(30, 41, 59, 0.7);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .secondary-btn:hover:not(:disabled) {
        background: rgba(15, 23, 42, 0.8);
    }

    .secondary-btn:disabled {
        opacity: 0.4;
    }

    .url-input {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Responsive Adjustments for New Buttons */
@media (max-width: 1024px) {
    .robots-main-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .card-header h2 {
        font-size: 1.1rem;
    }

    .card-header {
        padding: 1rem 1rem 0.625rem 1rem;
    }

    .template-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        max-width: 95%;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .primary-btn,
    .modal-footer .secondary-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .primary-btn,
    .secondary-btn {
        padding: 11px 18px;
        font-size: 0.95rem;
    }

    .card-header {
        padding: 0.875rem 0.875rem 0.5rem 0.875rem;
    }

    .card-header h2 {
        font-size: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    /* Smart Padding - Mobile adjustments */
    .robots-editor-card > :not(.card-header) {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .template-buttons {
        grid-template-columns: 1fr;
    }

    .template-btn {
        flex-direction: row;
        justify-content: center;
    }
}
