/* Frontend Rider Off-Canvas Form Styles */

/* Floating Trigger Button - Top Right */
.cbs-frontend-rider-trigger {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    animation: cbsFadeInDown 0.6s ease;
}

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

.cbs-frontend-add-rider-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.cbs-frontend-add-rider-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.cbs-frontend-add-rider-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.cbs-btn-icon {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

/* Off-Canvas Container */
.cbs-frontend-rider-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.cbs-frontend-rider-canvas.active {
    display: block;
}

/* Overlay */
.cbs-frontend-canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cbs-frontend-rider-canvas.active .cbs-frontend-canvas-overlay {
    opacity: 1;
}

/* Canvas Panel - Slides from Right */
.cbs-frontend-canvas-panel {
    position: absolute;
    top: 0;
    right: -550px;
    width: 550px;
    max-width: 100%;
    height: 100%;
    background: white;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cbs-frontend-rider-canvas.active .cbs-frontend-canvas-panel {
    right: 0;
}

/* Canvas Header */
.cbs-frontend-canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #E4AF5F 0%, #E4AF5F 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cbs-frontend-canvas-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.cbs-frontend-canvas-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbs-frontend-canvas-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Canvas Body */
.cbs-frontend-canvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px 30px;
}

/* Form Styles */
.cbs-frontend-rider-form {
    max-width: 100%;
}

.cbs-frontend-form-group {
    margin-bottom: 25px;
}

.cbs-frontend-form-group label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.required {
    color: #e74c3c;
}

.cbs-frontend-form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.cbs-frontend-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.cbs-frontend-form-group input::placeholder {
    color: #aaa;
}

.cbs-frontend-form-group input.error {
    border-color: #e74c3c;
}

/* Error Message */
.cbs-frontend-error-message {
    background: #ffe6e6;
    border-left: 4px solid #e74c3c;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    color: #c0392b;
    font-size: 14px;
    font-weight: 600;
    animation: cbsShake 0.5s ease;
}

@keyframes cbsShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Form Actions */
.cbs-frontend-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.cbs-frontend-submit-btn {
    flex: 1;
    background: linear-gradient(135deg, #E4AF5F 0%, #E4AF5F 100%);
    border: none;
    color: white !important;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.cbs-frontend-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.cbs-frontend-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cbs-frontend-cancel-btn {
    background: #f0f0f0;
    color: #666;
    border: none;
    padding: 16px 30px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cbs-frontend-cancel-btn:hover {
    background: #e0e0e0;
}

/* Spinner */
.cbs-frontend-spinner {
    display: inline-block;
}

.cbs-spinner-svg {
    width: 24px;
    height: 24px;
    animation: cbsRotate 2s linear infinite;
}

.cbs-spinner-svg .path {
    stroke: white;
    stroke-linecap: round;
    animation: cbsDash 1.5s ease-in-out infinite;
}

@keyframes cbsRotate {
    100% { transform: rotate(360deg); }
}

@keyframes cbsDash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Success Screen */
.cbs-frontend-success-screen {
    text-align: center;
    padding: 60px 30px;
}

.cbs-success-icon-wrap {
    margin-bottom: 30px;
}

.cbs-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.cbs-success-circle {
    stroke: #4caf50;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: cbsCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.cbs-success-check {
    stroke: #4caf50;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: cbsCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes cbsCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes cbsCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.cbs-frontend-success-screen h3 {
    font-size: 28px;
    color: #4caf50;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.cbs-rider-details {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin: 15px 0;
}

/* Shortcode Button Styles */
.cbs-shortcode-add-rider-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cbs-shortcode-add-rider-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cbs-style-minimal {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: none;
}

.cbs-style-minimal:hover {
    background: #667eea;
    color: white;
}

.cbs-style-large {
    padding: 18px 36px;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cbs-frontend-rider-trigger {
        top: 15px;
        right: 15px;
    }
    
    .cbs-frontend-add-rider-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .cbs-btn-text {
        display: none;
    }
    
    .cbs-btn-icon {
        font-size: 24px;
    }
    
    .cbs-frontend-canvas-panel {
        width: 100%;
        right: -100%;
    }
    
    .cbs-frontend-canvas-header {
        padding: 20px;
    }
    
    .cbs-frontend-canvas-header h2 {
        font-size: 22px;
    }
    
    .cbs-frontend-canvas-body {
        padding: 30px 20px;
    }
    
    .cbs-frontend-form-actions {
        flex-direction: column;
    }
    
    .cbs-frontend-success-screen {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .cbs-frontend-canvas-header h2 {
        font-size: 20px;
    }
    
    .cbs-frontend-form-group input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .cbs-success-icon {
        width: 60px;
        height: 60px;
    }
    
    .cbs-frontend-success-screen h3 {
        font-size: 24px;
    }
}

/* Riders Card View - Modern Design */

.cbs-riders-card-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f9fafb;
    min-height: 100vh;
}

/* Header */
.cbs-riders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cbs-riders-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cbs-riders-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Search Box */
.cbs-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.cbs-search-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    pointer-events: none;
}

#cbs-riders-search {
    padding: 10px 14px 10px 42px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    width: 250px;
    transition: all 0.3s ease;
    background: white;
}

#cbs-riders-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Add Passenger Button */
.cbs-add-passenger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #E4AF5F;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.cbs-add-passenger-btn:hover {
    background: #E4AF5F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Riders Grid */
.cbs-riders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Rider Card */
.cbs-rider-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.cbs-rider-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Avatar */
.cbs-rider-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Rider Info */
.cbs-rider-info {
    flex: 1;
    min-width: 0;
}

.cbs-rider-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.cbs-rider-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cbs-rider-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.cbs-rider-detail svg {
    flex-shrink: 0;
    color: #9ca3af;
}

/* Actions Menu */
.cbs-rider-actions {
    position: relative;
}

.cbs-action-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbs-action-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Dropdown Menu */
.cbs-action-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 10;
    animation: cbsDropdownFadeIn 0.2s ease;
}

@keyframes cbsDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cbs-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cbs-action-item:hover {
    background: #f9fafb;
}

.cbs-action-item:first-child {
    border-radius: 8px 8px 0 0;
}

.cbs-action-item:last-child {
    border-radius: 0 0 8px 8px;
}

.cbs-delete-rider {
    color: #dc2626;
}

.cbs-delete-rider:hover {
    background: #fef2f2;
}

.cbs-action-item svg {
    flex-shrink: 0;
}

/* No Riders State */
.cbs-no-riders {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: white;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.cbs-no-riders svg {
    margin-bottom: 20px;
}

.cbs-no-riders h3 {
    font-size: 24px;
    color: #111827;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.cbs-no-riders p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 25px 0;
}

.cbs-add-first-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cbs-add-first-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Loading State */
.cbs-rider-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Delete Animation */
.cbs-rider-card.deleting {
    animation: cbsCardFadeOut 0.3s ease forwards;
}

@keyframes cbsCardFadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cbs-riders-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .cbs-riders-card-container {
        padding: 20px 15px;
    }
    
    .cbs-riders-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cbs-riders-actions {
        width: 100%;
        flex-direction: column;
    }
    
    #cbs-riders-search {
        width: 100%;
    }
    
    .cbs-add-passenger-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cbs-riders-grid {
        grid-template-columns: 1fr;
    }
    
    .cbs-rider-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .cbs-riders-header h1 {
        font-size: 24px;
    }
    
    .cbs-rider-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .cbs-rider-name {
        font-size: 15px;
    }
    
    .cbs-rider-detail {
        font-size: 13px;
    }
}