/**
 * Public styles for Mask PAN GoPro plugin
 */

/* Base styles */
.mpg-form-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 600px;
    margin: 30px auto;
    color: #333;
}

/* Form Card */
.mpg-form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Form Header */
.mpg-form-header {
    padding: 30px;
    background: linear-gradient(135deg, #1E40AF, #3B82F6);
    color: #fff;
}

.mpg-form-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.mpg-form-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Form */
.mpg-form {
    padding: 30px;
}

.mpg-form-group {
    margin-bottom: 20px;
}

.mpg-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1E293B;
}

.mpg-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    color: #1E293B;
    background: #F8FAFC;
}

.mpg-form input[type="text"]:focus {
    border-color: #3B82F6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: #fff;
}

.mpg-form-help {
    display: block;
    margin-top: 5px;
    color: #64748B;
    font-size: 12px;
}

/* Form Actions */
.mpg-form-actions {
    margin-top: 30px;
}

.mpg-submit-btn {
    background: #1E40AF;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.mpg-submit-btn:hover {
    background: #1E3A8A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
}

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

/* Result */
.mpg-result {
    padding: 20px 30px;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    animation: fadeIn 0.5s;
}

.mpg-result-success {
    background: #DCFCE7;
    color: #166534;
}

.mpg-result-error {
    background: #FEE2E2;
    color: #B91C1C;
}

/* Loader */
.mpg-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.mpg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E2E8F0;
    border-top: 4px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.mpg-loader span {
    color: #1E293B;
    font-weight: 500;
}

/* Footer */
.mpg-form-footer {
    text-align: center;
    padding: 15px;
    color: #64748B;
    font-size: 12px;
}

.mpg-form-footer a {
    color: #3B82F6;
    text-decoration: none;
}

.mpg-form-footer a:hover {
    text-decoration: underline;
}

/* Theme: Dark */
.mpg-theme-dark .mpg-form-card {
    background: #1E293B;
    color: #E2E8F0;
}

.mpg-theme-dark .mpg-form-header {
    background: linear-gradient(135deg, #0F172A, #1E293B);
}

.mpg-theme-dark .mpg-form label {
    color: #E2E8F0;
}

.mpg-theme-dark .mpg-form input[type="text"] {
    background: #334155;
    border-color: #475569;
    color: #F8FAFC;
}

.mpg-theme-dark .mpg-form input[type="text"]:focus {
    border-color: #3B82F6;
    background: #475569;
}

.mpg-theme-dark .mpg-form-help {
    color: #94A3B8;
}

.mpg-theme-dark .mpg-result {
    background: #334155;
    border-top-color: #475569;
}

.mpg-theme-dark .mpg-loader {
    background: rgba(30, 41, 59, 0.9);
}

.mpg-theme-dark .mpg-loader span {
    color: #F8FAFC;
}

.mpg-theme-dark .mpg-form-footer {
    color: #94A3B8;
}

/* Theme: Blue */
.mpg-theme-blue .mpg-form-header {
    background: linear-gradient(135deg, #075985, #0EA5E9);
}

.mpg-theme-blue .mpg-submit-btn {
    background: #0EA5E9;
}

.mpg-theme-blue .mpg-submit-btn:hover {
    background: #0284C7;
}

.mpg-theme-blue .mpg-form input[type="text"]:focus {
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.mpg-theme-blue .mpg-spinner {
    border-top-color: #0EA5E9;
}

.mpg-theme-blue .mpg-form-footer a {
    color: #0EA5E9;
}

/* User Dashboard */
.mpg-user-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mpg-dashboard-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #1E40AF, #3B82F6);
    color: #fff;
}

.mpg-dashboard-header h2 {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 600;
}

.mpg-dashboard-header p {
    margin: 0;
    opacity: 0.9;
}

.mpg-empty-state {
    text-align: center;
    padding: 60px 30px;
    color: #64748B;
}

.mpg-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.mpg-empty-state h3 {
    margin: 0 0 10px;
    color: #1E293B;
    font-size: 20px;
}

.mpg-action {
    margin-top: 25px;
}

.mpg-btn {
    display: inline-block;
    background: #1E40AF;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.mpg-btn:hover {
    background: #1E3A8A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
}

.mpg-transactions-table-wrap {
    padding: 20px 30px;
    overflow-x: auto;
}

.mpg-transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.mpg-transactions-table th {
    text-align: left;
    padding: 12px 15px;
    background: #F1F5F9;
    color: #334155;
    font-weight: 600;
    border-bottom: 1px solid #E2E8F0;
}

.mpg-transactions-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #E2E8F0;
    color: #1E293B;
}

.mpg-transactions-table tr:hover {
    background: #F8FAFC;
}

.mpg-date {
    display: block;
    font-weight: 500;
}

.mpg-time {
    display: block;
    font-size: 12px;
    color: #64748B;
}

.mpg-pan {
    font-family: monospace;
    font-weight: 600;
}

.mpg-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.mpg-status-success {
    background: #DCFCE7;
    color: #166534;
}

.mpg-status-error {
    background: #FEE2E2;
    color: #B91C1C;
}

.mpg-message {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mpg-dashboard-footer {
    padding: 20px 30px;
    border-top: 1px solid #E2E8F0;
    text-align: right;
}

.mpg-dashboard-section {
    padding: 30px;
    border-top: 1px solid #E2E8F0;
}

.mpg-dashboard-section h3 {
    margin: 0 0 20px;
    color: #1E293B;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .mpg-form-container,
    .mpg-user-dashboard {
        margin: 15px auto;
        max-width: 100%;
    }
    
    .mpg-form-header,
    .mpg-dashboard-header {
        padding: 20px;
    }
    
    .mpg-form {
        padding: 20px;
    }
    
    .mpg-transactions-table th,
    .mpg-transactions-table td {
        padding: 10px;
    }
    
    .mpg-transactions-table {
        font-size: 14px;
    }
}