/* Square Payment Component Styles */

.square-payment-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.card-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

.card-entry-header h4 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Payment Summary Styles */
.payment-summary {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    border: 1px solid #dee2e6;
}

.payment-summary .row {
    align-items: center;
}

.payment-summary strong {
    font-weight: 600;
    color: #495057;
}

/* Saved Cards Section */
.saved-cards-section h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

.saved-card-option {
    cursor: pointer;
    margin-bottom: 10px;
}

.saved-card {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.saved-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.15);
}

.saved-card.selected {
    border-color: #007bff;
    background: #f8f9ff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.saved-card .card-body {
    padding: 16px;
}

.saved-card .fas.fa-credit-card {
    color: #6c757d;
    font-size: 1.1em;
}

.saved-card .text-muted {
    font-size: 0.875em;
}

.saved-card .btn-outline-danger {
    border: none;
    padding: 4px 8px;
    font-size: 0.875em;
}

.saved-card .btn-outline-danger:hover {
    background: #dc3545;
    color: white;
}

/* New Card Section */
.new-card-section h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

.form-check {
    margin-bottom: 20px;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.form-check-label {
    font-weight: 500;
    color: #495057;
}

/* Square Card Element Styles */
.square-card-element {
    min-height: 120px;
    padding: 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.square-card-element:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Card validation messages */
.card-validation-messages {
    min-height: 24px;
}

#card-errors {
    font-size: 0.875em;
    font-weight: 500;
}

/* Payment Actions */
.payment-actions {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.payment-actions .btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.payment-actions .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.payment-actions .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.payment-actions .btn-primary {
    background: #007bff;
    border-color: #007bff;
    min-width: 200px;
}

.payment-actions .btn-primary:hover:not(:disabled) {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.payment-actions .btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner styles */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert styles */
.alert {
    border-radius: 6px;
    font-weight: 500;
}

.alert-danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Icon styles */
.fas {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .square-payment-container {
        padding: 10px;
    }
    
    .card-container {
        padding: 16px;
    }
    
    .payment-summary .row > div {
        margin-bottom: 8px;
    }
    
    .payment-actions .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .payment-actions .btn {
        width: 100%;
    }
}

/* Focus and accessibility improvements */
.saved-card:focus,
.saved-card-option:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

/* Animation for loading states */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.processing {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Additional utility classes */
.text-end {
    text-align: right;
}

.me-1 {
    margin-right: 0.25rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.d-block {
    display: block;
}
