/* File Upload Info Styles */
.wap-file-info {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.wap-file-types,
.wap-file-size {
    display: block;
    color: #6c757d;
    margin: 2px 0;
}

.wap-file-types {
    font-weight: 500;
}

.wap-file-size {
    font-weight: 400;
}

/* Frontend styles - Reset & Base */
.wap-inline-form,
.wap-popup,
.wap-offcanvas {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.5;
}

/* Override tema CSS'leri */
.wap-form input[type="text"],
.wap-form input[type="email"],
.wap-form input[type="number"],
.wap-form input[type="tel"],
.wap-form input[type="url"],
.wap-form input[type="password"],
.wap-form select {
    margin-bottom: 0 !important;
}

/* Form Container */
.wap-form {
    display: block;
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Grid System */
.wap-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
    padding: 2px 0; /* Focus shadow için üst/alt alan */
}

.wap-col {
    padding: 0 12px;
    box-sizing: border-box;
    margin-bottom: 8px;
}

/* Grid Width Classes */
.wap-col-1-1 { 
    flex: 0 0 100%; 
    max-width: 100%;
}

.wap-col-1-2 { 
    flex: 0 0 50%; 
    max-width: 50%;
}

.wap-col-1-3 { 
    flex: 0 0 33.3333%; 
    max-width: 33.3333%;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .wap-col-1-2,
    .wap-col-1-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .wap-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .wap-form {
        padding: 16px;
    }
    
    .wap-row {
        margin: 0 -8px;
    }
    
    .wap-col {
        padding: 0 8px;
        margin-bottom: 6px;
    }
}

/* Form Fields */
.wap-field {
    width: 100%;
    display: block;
    position: relative;
    margin-bottom: 16px;
    padding: 2px; /* Focus shadow için alan */
}

.wap-field:last-child {
    margin-bottom: 0;
}

.wap-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    width: 100%;
    clear: both;
}

.wap-field label .required {
    color: #d63638;
    margin-left: 2px;
}

.wap-field input[type="text"],
.wap-field input[type="email"],
.wap-field input[type="number"],
.wap-field input[type="tel"],
.wap-field input[type="url"],
.wap-field input[type="date"],
.wap-field input[type="datetime-local"],
.wap-field input[type="time"],
.wap-field input[type="color"],
.wap-field input[type="range"],
.wap-field textarea,
.wap-field select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px !important;
    border: 1px solid #ddd;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.wap-field input:focus,
.wap-field textarea:focus,
.wap-field select:focus {
    outline: none;
    border-color: #ab4454;
    box-shadow: 0 0 0 2px rgba(171, 68, 84, 0.1);
}

.wap-field textarea {
    min-height: 120px;
    resize: vertical;
}

/* Radio and Checkbox Options */
.wap-options-wrapper {
    display: flex;
    gap: 12px;
}

/* Vertical Layout (Default - Alt Alta) */
.wap-options-vertical {
    flex-direction: column;
}

.wap-options-vertical .wap-option {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 15px;
}

/* Horizontal Layout (Yan Yana) */
.wap-options-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}

.wap-options-horizontal .wap-option {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
}

/* Radio and Checkbox Inputs */
.wap-field .wap-option input[type="radio"],
.wap-field .wap-option input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

/* Responsive - Horizontal seçenekleri mobile'da vertical'e dön */
@media (max-width: 480px) {
    .wap-options-horizontal {
        flex-direction: column;
    }
    
    .wap-options-horizontal .wap-option {
        white-space: normal;
    }
}

/* Buttons */
.wap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    background: #ab4454;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px;
    line-height: 1.4;
}

.wap-btn:hover,
.wap-btn:focus {
    background: #8b3644;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.wap-btn:active {
    transform: translateY(0);
}

.wap-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button Sizes */
.wap-btn-size-small {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
}

.wap-btn-size-medium {
    padding: 12px 24px;
    font-size: 16px;
    min-height: 44px;
}

.wap-btn-size-large {
    padding: 16px 32px;
    font-size: 18px;
    min-height: 52px;
}

/* Button Colors */
.wap-btn-primary {
    background: #ab4454;
}

.wap-btn-primary:hover,
.wap-btn-primary:focus {
    background: #8b3644;
}

.wap-btn-secondary {
    background: #757575;
}

.wap-btn-secondary:hover,
.wap-btn-secondary:focus {
    background: #5a5a5a;
}

.wap-btn-success {
    background: #28a745;
}

.wap-btn-success:hover,
.wap-btn-success:focus {
    background: #218838;
}

.wap-btn-danger {
    background: #dc3545;
}

.wap-btn-danger:hover,
.wap-btn-danger:focus {
    background: #c82333;
}

.wap-btn-warning {
    background: #ffc107;
    color: #333;
}

.wap-btn-warning:hover,
.wap-btn-warning:focus {
    background: #e0a800;
    color: #333;
}

.wap-btn-info {
    background: #17a2b8;
}

.wap-btn-info:hover,
.wap-btn-info:focus {
    background: #138496;
}

/* Button Icons */
.wap-btn .wap-btn-icon {
    display: inline-flex;
    font-size: 1.2em;
}

.wap-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.wap-btn .fa {
    font-size: 1.1em;
}

/* Submit Button */
.wap-btn-submit {
    width: 100%;
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 480px) {
    .wap-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .wap-btn-size-large {
        padding: 14px 28px;
        font-size: 17px;
    }
}

/* Messages */
.wap-form-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    display: none;
}

.wap-form-message.wap-success {
    color: #0a7f2e;
    background: #e8f5e9;
    border: 1px solid #81c784;
    display: block;
}

.wap-form-message.wap-error {
    color: #b81d13;
    background: #ffebee;
    border: 1px solid #ef5350;
    display: block;
}

/* Popup & Offcanvas */
.wap-popup,
.wap-offcanvas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.2s ease;
}

/* Offcanvas için özel düzenleme */
.wap-offcanvas {
    justify-content: flex-end;
    align-items: stretch;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wap-popup.active,
.wap-offcanvas.active {
    display: flex;
}

.wap-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    cursor: pointer;
}

.wap-popup-content {
    position: relative;
    background: #fff;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Form Title */
.wap-form-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.wap-popup-content h3,
.wap-offcanvas-content h3,
.wap-inline-form .wap-form-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.wap-offcanvas {
    background: rgba(0, 0, 0, 0.5);
}

/* Offcanvas - Right Side (Default) - Bu kurallar yukarıda tanımlandı */

.wap-offcanvas-content {
    position: fixed;
    background: #fff;
    width: 450px;
    max-width: 450px;
    height: 100vh;
    top: 0;
    right: 0;
    padding: 32px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000000;
}

/* Geniş ekran için özel düzenleme - Fixed positioning ile otomatik olarak sağa yapışır */

.wap-offcanvas.active .wap-offcanvas-content,
.wap-offcanvas-right.active .wap-offcanvas-content {
    transform: translateX(0);
}

/* Offcanvas - Left Side */
.wap-offcanvas-left {
    justify-content: flex-start;
    align-items: stretch;
}

.wap-offcanvas-left .wap-offcanvas-content {
    left: 0;
    right: auto;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.wap-offcanvas-left.active .wap-offcanvas-content {
    transform: translateX(0);
}

/* Offcanvas responsiveness */
@media (max-width: 768px) {
    .wap-popup-content {
        padding: 24px;
        width: 95%;
    }
    
    .wap-offcanvas-content {
        width: 100vw;
        max-width: 100vw;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .wap-offcanvas-content {
        padding: 20px;
    }
}

/* Close Button */
.wap-close {
    background: #f5f5f5;
    border: none;
    font-size: 24px;
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease;
    color: #666;
    line-height: 1 !important;
    z-index: 10;
    padding: 0 0 3px 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    font-weight: bold;
    text-align: center !important;
}

.wap-close:hover {
    background: #dc3545;
    color: white;
    border-radius: 50% !important;
    transform: scale(1.05);
}

/* Trigger Button */
.wap-trigger {
    margin-top: 15px;
}

/* Honeypot (spam protection) */
.wap-honeypot,
.wap-honeypot-label {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
}

/* CAPTCHA */
.wap-captcha {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.wap-captcha img {
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wap-captcha input[type="text"] {
    flex: 1;
    min-width: 120px;
}

.wap-captcha-refresh {
    border: none;
    background: #ab4454;
    color: #fff;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.wap-captcha-refresh:hover {
    background: #8b3644;
}

/* reCAPTCHA container */
.g-recaptcha {
    margin: 16px 0;
}

/* Accessibility improvements */
.wap-field input:focus,
.wap-field textarea:focus,
.wap-field select:focus,
.wap-btn:focus,
.wap-close:focus,
.wap-captcha-refresh:focus {
    outline-offset: 2px;
}

.wap-close:focus {
    border-radius: 50% !important;
}

/* Loading state */
.wap-form.wap-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Field Numbering */
.wap-field label .wap-field-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #ab4454;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}

/* Ensure field number doesn't interfere with inputs */
.wap-field input[type="text"],
.wap-field input[type="email"],
.wap-field input[type="number"],
.wap-field input[type="tel"],
.wap-field input[type="url"],
.wap-field input[type="date"],
.wap-field input[type="datetime-local"],
.wap-field input[type="time"],
.wap-field input[type="file"],
.wap-field textarea,
.wap-field select {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* File Input Styling */
.wap-field input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.wap-field .wap-file-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.wap-field .wap-file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #ab4454;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(171, 68, 84, 0.3);
    width: 100%;
    min-height: 48px;
}

.wap-field .wap-file-button:hover {
    background: #8b3644;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(171, 68, 84, 0.4);
}

.wap-field .wap-file-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(171, 68, 84, 0.3);
}

.wap-field .wap-file-button::before {
    content: "📁";
    margin-right: 8px;
    font-size: 16px;
}

.wap-field .wap-file-name {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    display: none;
}

.wap-field .wap-file-name.has-file {
    display: block;
}

.wap-field .wap-file-name::before {
    content: "✅ ";
    color: #28a745;
    font-weight: bold;
    display: inline-block;
    width: auto;
    margin-right: 6px;
}

/* Field Separator */
.wap-field-separator {
    width: 100%;
    border: none;
}

/* Pagination - Pages */
.wap-pages-container {
    position: relative;
    min-height: 200px;
    overflow: hidden;
}

.wap-page {
    width: 100%;
}

.wap-page-active {
    display: block;
}

.wap-page-hidden {
    display: none;
}

/* Pagination Controls */
.wap-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e1e1e1;
}

.wap-btn-prev,
.wap-btn-next {
    flex: 0 0 auto;
    min-width: 120px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wap-btn-prev:hover,
.wap-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wap-btn-prev .wap-arrow,
.wap-btn-next .wap-arrow {
    font-size: 1.2em;
    display: inline-flex;
    font-weight: bold;
}

/* Pagination Button Color Variants */
.wap-pagination-primary .wap-btn-prev,
.wap-pagination-primary .wap-btn-next {
    background: #ab4454;
    color: #fff;
    border-color: #ab4454;
}

.wap-pagination-primary .wap-btn-prev:hover,
.wap-pagination-primary .wap-btn-next:hover {
    background: #8b3644;
    border-color: #8b3644;
}

.wap-pagination-secondary .wap-btn-prev,
.wap-pagination-secondary .wap-btn-next {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.wap-pagination-secondary .wap-btn-prev:hover,
.wap-pagination-secondary .wap-btn-next:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.wap-pagination-success .wap-btn-prev,
.wap-pagination-success .wap-btn-next {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

.wap-pagination-success .wap-btn-prev:hover,
.wap-pagination-success .wap-btn-next:hover {
    background: #218838;
    border-color: #218838;
}

.wap-pagination-danger .wap-btn-prev,
.wap-pagination-danger .wap-btn-next {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.wap-pagination-danger .wap-btn-prev:hover,
.wap-pagination-danger .wap-btn-next:hover {
    background: #c82333;
    border-color: #c82333;
}

.wap-pagination-warning .wap-btn-prev,
.wap-pagination-warning .wap-btn-next {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.wap-pagination-warning .wap-btn-prev:hover,
.wap-pagination-warning .wap-btn-next:hover {
    background: #e0a800;
    border-color: #e0a800;
}

.wap-pagination-info .wap-btn-prev,
.wap-pagination-info .wap-btn-next {
    background: #17a2b8;
    color: #fff;
    border-color: #17a2b8;
}

.wap-pagination-info .wap-btn-prev:hover,
.wap-pagination-info .wap-btn-next:hover {
    background: #138496;
    border-color: #138496;
}

.wap-pagination-dark .wap-btn-prev,
.wap-pagination-dark .wap-btn-next {
    background: #343a40;
    color: #fff;
    border-color: #343a40;
}

.wap-pagination-dark .wap-btn-prev:hover,
.wap-pagination-dark .wap-btn-next:hover {
    background: #23272b;
    border-color: #23272b;
}

.wap-pagination-light .wap-btn-prev,
.wap-pagination-light .wap-btn-next {
    background: #f8f9fa;
    color: #212529;
    border-color: #dee2e6;
}

.wap-pagination-light .wap-btn-prev:hover,
.wap-pagination-light .wap-btn-next:hover {
    background: #e2e6ea;
    border-color: #dae0e5;
}

/* Page Indicators */
.wap-pagination-indicators {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex: 1;
}

.wap-page-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wap-page-indicator:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.wap-page-indicator.active {
    background: #ab4454;
    color: #fff;
    transform: scale(1.15);
}

/* Progress Bar */
.wap-progress-container {
    width: 100%;
    height: 6px;
    background: #e1e1e1;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
}

.wap-progress-bar {
    height: 100%;
    background: #ab4454;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Field Error State */
.wap-field-error,
.wap-field.wap-field-error input,
.wap-field.wap-field-error textarea,
.wap-field.wap-field-error select {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

/* Mobile Pagination */
@media (max-width: 768px) {
    .wap-hide-mobile {
        display: none !important;
    }
    
    .wap-pagination-controls {
        justify-content: space-between;
    }
    
    .wap-btn-prev .wap-btn-text,
    .wap-btn-next .wap-btn-text {
        display: none;
    }
    
    .wap-btn-prev,
    .wap-btn-next {
        min-width: 48px;
        padding: 12px;
    }
    
    .wap-btn-prev .wap-arrow,
    .wap-btn-next .wap-arrow {
        margin: 0;
    }
}
