/* Brandaft Schema Generator CSS */
.brandaft-schema-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

.brandaft-schema-header {
    text-align: center;
    margin-bottom: 40px;
}

.brandaft-schema-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 8px 0;
}

.brandaft-schema-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Schema Türü Seçimi */
.brandaft-schema-type-selection h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3878C3;
}

.brandaft-schema-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.brandaft-schema-type-card {
    padding: 24px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #fff;
}

.brandaft-schema-type-card:hover {
    border-color: #3878C3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 120, 195, 0.15);
}

.brandaft-schema-type-card.selected {
    border-color: #3878C3;
    background: linear-gradient(135deg, #f8f9fa, #e8f4f8);
    box-shadow: 0 4px 15px rgba(56, 120, 195, 0.2);
}

.brandaft-schema-type-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.brandaft-schema-type-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.brandaft-schema-type-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Form Section */
.brandaft-schema-form-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e1e5e9;
}

.brandaft-schema-form-section h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ED5D0E;
}

/* Field Groups */
.brandaft-field-group {
    margin-bottom: 20px;
}

.brandaft-field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.brandaft-required {
    color: #dc3545;
    margin-left: 2px;
}

.brandaft-tooltip {
    cursor: help;
    margin-left: 6px;
    position: relative;
}

.brandaft-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.brandaft-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 95%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

.brandaft-field-input,
.brandaft-field-textarea,
.brandaft-field-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.brandaft-field-input:focus,
.brandaft-field-textarea:focus,
.brandaft-field-select:focus {
    border-color: #3878C3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 120, 195, 0.1);
}

.brandaft-field-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Repeater Fields */
.brandaft-field-repeater {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

.brandaft-repeater-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.brandaft-repeater-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.brandaft-repeater-title {
    font-weight: 600;
    color: #333;
}

.brandaft-remove-repeater-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.brandaft-remove-repeater-item:hover {
    background: #fff5f5;
}

.brandaft-repeater-content {
    padding: 16px;
}

.brandaft-repeater-content .brandaft-field-group {
    margin-bottom: 16px;
}

.brandaft-repeater-content .brandaft-field-group:last-child {
    margin-bottom: 0;
}

/* Buttons */
.brandaft-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
}

.brandaft-btn-primary {
    background: linear-gradient(135deg, #3878C3, #2a5f9b);
    color: white;
}

.brandaft-btn-primary:hover {
    background: linear-gradient(135deg, #2a5f9b, #1e4973);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 120, 195, 0.3);
}

.brandaft-btn-secondary {
    background: #6c757d;
    color: white;
}

.brandaft-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.brandaft-btn-success {
    background: #28a745;
    color: white;
}

.brandaft-btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.brandaft-btn-info {
    background: #17a2b8;
    color: white;
}

.brandaft-btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

.brandaft-btn-outline {
    background: transparent;
    color: #3878C3;
    border: 2px solid #3878C3;
}

.brandaft-btn-outline:hover {
    background: #3878C3;
    color: white;
}

.brandaft-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.brandaft-add-repeater-item {
    width: 100%;
    margin-top: 12px;
}

/* Form Actions */
.brandaft-schema-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* Loading Spinner */
.brandaft-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: brandaft-spin 1s linear infinite;
}

@keyframes brandaft-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Result Section */
.brandaft-schema-result-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e1e5e9;
}

.brandaft-schema-result-section h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #28a745;
}

.brandaft-schema-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.brandaft-schema-result-info span {
    display: inline-block;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

.brandaft-schema-result-actions {
    display: flex;
    gap: 8px;
}

.brandaft-schema-code-container {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.brandaft-schema-code-container pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    background: #2d3748;
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.brandaft-schema-code-container code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Usage Guide */
.brandaft-schema-usage {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
}

.brandaft-schema-usage h4 {
    margin: 0 0 12px 0;
    color: #856404;
}

.brandaft-schema-usage ol {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.brandaft-schema-usage code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

/* Error Section */
.brandaft-schema-error {
    text-align: center;
    padding: 40px 20px;
}

.brandaft-schema-error-content {
    max-width: 400px;
    margin: 0 auto;
}

.brandaft-schema-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.brandaft-schema-error-title {
    font-size: 20px;
    color: #dc3545;
    margin: 0 0 12px 0;
}

.brandaft-schema-error-message {
    color: #666;
    margin: 0 0 20px 0;
}

/* Footer */
.brandaft-schema-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.brandaft-schema-credit {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.brandaft-schema-credit a {
    color: #3878C3;
    text-decoration: none;
    font-weight: 500;
}

.brandaft-schema-credit a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .brandaft-schema-container {
        padding: 15px;
    }
    
    .brandaft-schema-types {
        grid-template-columns: 1fr;
    }
    
    .brandaft-schema-result-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .brandaft-schema-result-actions {
        justify-content: center;
    }
    
    .brandaft-schema-form-actions {
        flex-direction: column;
    }
    
    .brandaft-schema-code-container pre {
        padding: 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .brandaft-schema-title {
        font-size: 22px;
    }
    
    .brandaft-schema-type-card {
        padding: 16px;
    }
    
    .brandaft-schema-type-icon {
        font-size: 36px;
    }
    
    .brandaft-tooltip:hover::after {
        white-space: normal;
        max-width: 200px;
    }
}

/* Animation */
.brandaft-schema-form-section,
.brandaft-schema-result-section {
    animation: brandaft-fade-in 0.5s ease-in;
}

@keyframes brandaft-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Copy Success Feedback */
.brandaft-btn-success.copied {
    background: #20c997 !important;
    transform: scale(1.05);
}

.brandaft-btn-success.copied::after {
    content: "✓ Kopyalandı!";
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #20c997;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    animation: brandaft-copy-feedback 2s ease-out;
}

@keyframes brandaft-copy-feedback {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}