/* Memorial Profiles Form Styles */
.qrlm-memorial-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.qrlm-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.qrlm-form-section h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.qrlm-form-row {
    margin-bottom: 15px;
}

.qrlm-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.qrlm-form-row input[type="text"],
.qrlm-form-row select,
.qrlm-form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.qrlm-form-row textarea {
    min-height: 100px;
}

.qrlm-form-row-half {
    width: 48%;
    display: inline-block;
    vertical-align: top;
}

.qrlm-form-row-half:nth-child(odd) {
    margin-right: 3%;
}

.qrlm-package-info {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

/* Dropzone styles */
.qrlm-dropzone {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qrlm-dropzone:hover,
.qrlm-dropzone-active {
    border-color: #999;
    background-color: #f9f9f9;
}

.qrlm-dropzone-instructions {
    color: #666;
}

.qrlm-dropzone-instructions .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
}

/* Preview styles */
.qrlm-preview-container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
    min-height: 50px;
}

.qrlm-preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: move;
}

.qrlm-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qrlm-video-info {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 10px;
    background-color: #f5f5f5;
    text-align: center;
    font-size: 12px;
    word-break: break-word;
}

.qrlm-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrlm-remove-btn:hover {
    background-color: rgba(255, 0, 0, 0.1);
}

.qrlm-sortable-placeholder {
    border: 1px dashed #999;
    background-color: #f9f9f9;
    width: 150px;
    height: 150px;
    margin: 5px;
}

/* Form actions */
.qrlm-form-actions {
    margin-top: 20px;
    text-align: center;
}

.qrlm-submit-btn {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.qrlm-submit-btn:hover {
    background-color: #005177;
}

.qrlm-loading {
    margin-top: 10px;
    font-style: italic;
}

/* Messages */
.qrlm-form-messages {
    margin-top: 20px;
}

.qrlm-success {
    padding: 10px 15px;
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    border-radius: 4px;
}

.qrlm-error {
    padding: 10px 15px;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
    border-radius: 4px;
}

/* Multistep Form Styles */
.qrlm-multistep-form {
    position: relative;
}

.qrlm-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.qrlm-progress {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a32a);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.qrlm-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.qrlm-step-active {
    display: block;
}

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

/* Form Step Headers */
.qrlm-step h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    position: relative;
}

.qrlm-step h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #00a32a;
}

/* Navigation Buttons */
.qrlm-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.qrlm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qrlm-btn-primary {
    background-color: #0073aa;
    color: white;
}

.qrlm-btn-primary:hover {
    background-color: #005177;
    transform: translateY(-1px);
}

.qrlm-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.qrlm-btn-secondary:hover {
    background-color: #e0e0e0;
}

.qrlm-btn-back {
    background-color: #6c757d;
    color: white;
}

.qrlm-btn-back:hover {
    background-color: #545b62;
}

.qrlm-btn-next {
    background-color: #0073aa;
    color: white;
}

.qrlm-btn-next:hover {
    background-color: #005177;
}

/* Template Selection Styles */
.qrlm-template-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.qrlm-template-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.qrlm-template-option:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0,115,170,0.1);
}

.qrlm-template-option.qrlm-selected {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.qrlm-template-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.qrlm-template-preview {
    margin-right: 15px;
    flex-shrink: 0;
}

.qrlm-template-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.qrlm-template-option.qrlm-selected .qrlm-template-preview img {
    border-color: #0073aa;
}

.qrlm-template-info {
    flex: 1;
}

.qrlm-template-info h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #333;
}

.qrlm-template-demo {
    margin-top: 10px;
}

.qrlm-demo-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.qrlm-demo-link:hover {
    text-decoration: underline;
}



/* Payment Form Styles */
.qrlm-payment-form {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.qrlm-payment-fields {
    margin-top: 20px;
}

.qrlm-payment-fields .qrlm-form-row {
    margin-bottom: 20px;
}

.qrlm-form-inline {
    display: flex;
    gap: 15px;
}

.qrlm-form-inline > div {
    flex: 1;
}

.qrlm-process-payment {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.qrlm-process-payment:hover {
    background-color: #218838;
}

.qrlm-process-payment:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.qrlm-payment-success {
    text-align: center;
    padding: 20px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
}

/* Package Selection Step */
.qrlm-package-selection-step {
    text-align: center;
    padding: 20px 0;
}

.qrlm-package-selection-step h3 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.qrlm-package-selection-step p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
}

/* Subscription Required Message */
.qrlm-subscription-required {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    margin: 20px 0;
}

.qrlm-subscription-required h3 {
    color: #856404;
    margin-bottom: 15px;
}

.qrlm-subscription-required p {
    color: #856404;
    margin-bottom: 20px;
}

.qrlm-selected-package-info {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.qrlm-selected-package-info h4 {
    color: #333;
    margin: 0 0 10px;
    font-size: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .qrlm-template-selection {
        grid-template-columns: 1fr;
    }

    .qrlm-form-inline {
        flex-direction: column;
        gap: 0;
    }

    .qrlm-form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .qrlm-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading States */
.qrlm-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-style: italic;
}

.qrlm-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error States */
.qrlm-error-field {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Date Picker Styles */
.ui-datepicker {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ui-datepicker-header {
    background-color: #0073aa;
    color: white;
    border-radius: 6px 6px 0 0;
}

/* Age Display */
.qrlm-age-display {
    margin-left: 10px;
    font-weight: bold;
    color: #0073aa;
}

/* Responsive styles */
@media (max-width: 768px) {
    .qrlm-form-row-half {
        width: 100%;
        margin-right: 0;
    }
}

/* Template Selection Styles */
.qrlm-template-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.qrlm-template-option {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.qrlm-template-option:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
}

.qrlm-template-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qrlm-template-option input[type="radio"]:checked + .qrlm-template-label {
    border-color: #007cba;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
}

.qrlm-template-option input[type="radio"]:checked + .qrlm-template-label::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #007cba;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.qrlm-template-label {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
    position: relative;
    transition: all 0.3s ease;
}

.qrlm-template-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrlm-template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qrlm-template-option:hover .qrlm-template-preview img {
    transform: scale(1.05);
}

.qrlm-template-info {
    padding: 20px;
}

.qrlm-template-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.qrlm-template-info p {
    margin: 0 0 15px 0;
    color: #6c757d;
    line-height: 1.5;
    font-size: 14px;
}

.qrlm-template-demo {
    margin-top: 15px;
}

.qrlm-demo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.qrlm-demo-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.qrlm-demo-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.qrlm-template-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .qrlm-template-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .qrlm-template-selection {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .qrlm-template-info {
        padding: 15px;
    }
    
    .qrlm-template-preview {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .qrlm-template-info h4 {
        font-size: 16px;
    }
    
    .qrlm-template-info p {
        font-size: 13px;
    }
    
    .qrlm-demo-link {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* QR Code Styles */
.qrlm-qr-code-container {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.qrlm-qr-profile-info {
    margin-bottom: 20px;
}

.qrlm-qr-profile-info h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.qrlm-qr-profile-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.qrlm-qr-code-wrapper {
    display: inline-block;
    margin: 20px 0;
}

.qrlm-qr-code {
    display: inline-block;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin-bottom: 15px;
}

.qrlm-qr-code canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.qrlm-qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.qrlm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #007cba;
    color: white;
}

.qrlm-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.qrlm-btn-download {
    background: #28a745;
}

.qrlm-btn-download:hover {
    background: #1e7e34;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.qrlm-btn-print {
    background: #6c757d;
}

.qrlm-btn-print:hover {
    background: #545b62;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.qrlm-qr-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.qrlm-qr-url {
    margin: 0;
    font-size: 14px;
    color: #495057;
}

.qrlm-qr-url strong {
    color: #2c3e50;
}

.qrlm-qr-url a {
    color: #007cba;
    text-decoration: none;
    word-break: break-all;
}

.qrlm-qr-url a:hover {
    text-decoration: underline;
}

/* QR Code Loading State */
.qrlm-qr-code-container.qrlm-loading .qrlm-qr-code {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrlm-qr-code-container.qrlm-loading .qrlm-qr-code::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: qrlm-spin 1s linear infinite;
}

@keyframes qrlm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* QR Code Error State */
.qrlm-qr-code .qrlm-error {
    color: #dc3545;
    font-size: 14px;
    margin: 0;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Responsive QR Code */
@media (max-width: 768px) {
    .qrlm-qr-code-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .qrlm-qr-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .qrlm-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .qrlm-qr-code {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .qrlm-qr-profile-info h4 {
        font-size: 18px;
    }
    
    .qrlm-qr-profile-info p {
        font-size: 13px;
    }
    
    .qrlm-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Payment Step Styles */
.qrlm-payment-step {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.qrlm-payment-step h3 {
    color: #333;
    font-size: 28px;
    margin-bottom: 15px;
}

.qrlm-payment-step p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.qrlm-profile-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.qrlm-profile-summary h4 {
    color: #333;
    margin: 0 0 10px;
    font-size: 18px;
}

.qrlm-payment-actions {
    margin-top: 30px;
}

/* Process Profile Payment Button */
.qrlm-process-profile-payment {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.qrlm-process-profile-payment:hover {
    background-color: #218838;
}

.qrlm-process-profile-payment:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Pending Payment Status */
.qrlm-profile-status-pending {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.qrlm-profile-status-pending h4 {
    color: #856404;
    margin: 0 0 10px;
}

/* Loading Step Styles */
.qrlm-loading-step {
    text-align: center;
    padding: 40px 20px;
}

.qrlm-loading-step h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 15px;
}

.qrlm-loading-step p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.qrlm-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Mobile responsive for payment step */
@media (max-width: 768px) {
    .qrlm-payment-step {
        padding: 0 15px;
    }

    .qrlm-profile-summary {
        text-align: center;
    }

    .qrlm-loading-step {
        padding: 20px 15px;
    }
}