/**
 *Swift Checkout Admin Styles
 */

.swift-checkout-settings .nav-tab-wrapper {
    margin-bottom: 20px;
}

.swift-checkout-settings .tab-content {
    margin-top: 20px;
}

.swift-checkout-settings .form-table th {
    width: 250px;
}

.swift-checkout-settings .error-message {
    color: #d63638;
    margin-top: 5px;
    font-style: italic;
}

.swift-checkout-settings .description {
    margin-top: 5px;
    font-style: italic;
    color: #666;
}

/* Builder selection styling */
.swift-checkout-settings .builder-option {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f9f9f9;
}

.swift-checkout-settings .builder-option img {
    width: 50px;
    height: 50px;
    margin-right: 20px;
}

.swift-checkout-settings .builder-option .builder-info {
    flex: 1;
}

.swift-checkout-settings .builder-option h3 {
    margin: 0 0 10px 0;
}

.swift-checkout-settings .builder-option p {
    margin: 0;
}

/* Feature options styling */
.swift-checkout-settings .feature-option {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.swift-checkout-settings .feature-option:last-child {
    border-bottom: none;
}

/* Checkout Field Styles */
.swift-checkout-fields-container {
    margin: 15px 0;
}

.swift-checkout-field-item {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    overflow: hidden;
}

.swift-checkout-field-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.swift-checkout-field-header {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.swift-checkout-field-header:hover {
    background-color: #f0f0f0;
}

.swift-checkout-field-drag-handle {
    margin-right: 8px;
    color: #999;
    cursor: grab;
}

.swift-checkout-field-drag-handle:hover {
    color: #2271b1;
}

.swift-checkout-field-title {
    flex-grow: 1;
    font-weight: 500;
    font-size: 14px;
}

.swift-checkout-field-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.swift-checkout-field-actions .dashicons {
    color: #777;
    cursor: pointer;
    transition: color 0.2s ease;
}

.swift-checkout-field-actions .dashicons:hover {
    color: #2271b1;
}

.swift-checkout-field-content {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
    display: none; /* Hidden by default */
    animation: slideDown 0.2s ease-out;
}

.swift-checkout-field-content.collapsed {
    display: none !important;
}

/* Transition effect for expanding/collapsing */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dragging states */
.swift-checkout-field-item.is-dragging {
    opacity: 0.7;
    transform: scale(1.02);
    border: 1px dashed #2271b1;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.swift-checkout-field-item.drag-over {
    border: 2px dashed #2271b1;
    margin-top: 8px;
    margin-bottom: 8px;
    padding-top: 2px;
}

/* Add/Remove field buttons */
.components-button.has-icon.swift-checkout-add-field {
    justify-content: center;
    width: 100%;
    margin-top: 15px;
}

/* Frontend checkout fields styling */
.swift-checkout-form-row {
    position: relative;
    margin-bottom: 20px;
}

.swift-checkout-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.swift-checkout-form-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.swift-checkout-form-label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #666;
    font-size: 16px;
    transition: all 0.2s ease;
    pointer-events: none;
    background-color: transparent;
}

.swift-checkout-form-input:focus + .swift-checkout-form-label,
.swift-checkout-form-input:not(:placeholder-shown) + .swift-checkout-form-label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    background-color: #fff;
    padding: 0 5px;
    color: #2271b1;
}

.swift-checkout-form-input.error {
    border-color: #d63638;
}

.swift-checkout-form-input.error + .swift-checkout-form-label {
    color: #d63638;
}

.swift-checkout-input-group {
    display: flex;
    gap: 15px;
}

.swift-checkout-input-group .swift-checkout-form-row {
    flex: 1;
}

/* Required field indicator */
.swift-checkout-form-label .required {
    color: #d63638;
    margin-left: 2px;
}

/* Custom checkbox styling */
.swift-checkout-checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.swift-checkout-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.swift-checkout-checkbox-input {
    margin-right: 8px;
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ddd;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
}

.swift-checkout-checkbox-input:checked {
    background-color: #2271b1;
    border-color: #2271b1;
}

.swift-checkout-checkbox-input:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}