/* Custom styles based on the provided CSS template */
* {
    margin: 0;
    padding: 0;
}

:root {
    --color-green: #24C196;
    --color-text: #333333;
    --color-blue: #2382F7;
    --color-light-bg: #f5f5f5;
    --transition-time: 0.3s;
}

body {
    max-width: 720px;
    font-family: "Poppins", sans-serif;
    margin: 0 auto;
    position: relative;
    background-color: #ffffff;
}

.content {
    max-width: 350px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 16px;
    margin: 20px auto 0;
}

.remaining-validity, .remaining-data, .iccid, .esim-status {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 16px;
    border-radius: 16px;
}

.percent-usage {
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    margin-top: 8px;
    margin-bottom: 8px;
    position: relative;
}

.percent-usage .inner {
    height: 100%;
    background: #2382F7;
    border-radius: 4px;
    width: 0;
    position: absolute;
    left: 0;
    top: 0;
}

.progress {
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    margin: 8px 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #2382F7;
    border-radius: 4px;
    transition: width 1s ease;
}

.bottom {
    margin-top: 100px;
}

.hide {
    display: none !important;
}

.status {
    padding: 10px;
    border-radius: 8px;
}

/* 將 logo 置中 */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 100%;
    height: auto;
    width: 150px;
    margin-bottom: 20px;
}

/* 複製圖示樣式 */
.copy-icon {
    cursor: pointer;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.3s ease;
}

/* Overriding bootstrap dark theme */
[data-bs-theme=dark] {
    --bs-body-color: #333333;
    --bs-body-bg: #ffffff;
}

.card {
    background-color: #f5f5f5;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.card-header {
    background-color: transparent;
    border-bottom: none;
    padding: 1rem 1.25rem;
    color: var(--bs-body-color);
}

.card-body {
    padding: 1rem;
}

/* Loading animation styles */
.loading-container {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 16px;
    margin: 30px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 350px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.spinner-border {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--color-blue);
    border-width: 0.25em;
    animation: spinner-border 1.2s linear infinite;
}

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

.loading-text {
    color: var(--color-text);
    font-size: 18px;
    font-weight: 500;
    animation: fadeIn 0.5s ease-out;
}

/* Button styles */

.btn-primary {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all var(--transition-time) ease;
}

.btn-primary:hover {
    background-color: #1a6fd9;
    border-color: #1a6fd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Progress bar animation */
.percent-usage .inner {
    transition: width 1.5s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 0 15px;
    }
    
    .card {
        margin-left: 10px;
        margin-right: 10px;
    }
}
